Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions plugins/postcss-nesting/.bin/test-lint.js

This file was deleted.

91 changes: 0 additions & 91 deletions plugins/postcss-nesting/.bin/test-tape.js

This file was deleted.

29 changes: 0 additions & 29 deletions plugins/postcss-nesting/.bin/test.js

This file was deleted.

15 changes: 0 additions & 15 deletions plugins/postcss-nesting/.editorconfig

This file was deleted.

33 changes: 0 additions & 33 deletions plugins/postcss-nesting/.github/workflows/test.yml

This file was deleted.

8 changes: 2 additions & 6 deletions plugins/postcss-nesting/.gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
node_modules
postcss-7-nesting
postcss-8-nesting
dist
package-lock.json
yarn.lock
*.log*
*.result.css
.*
!.bin
*.result.css.map
!.editorconfig
!.github
!.gitignore
!.npmrc
!.rollup.js
!.tape.js
!.travis.yml
!.github
2 changes: 0 additions & 2 deletions plugins/postcss-nesting/.npmrc

This file was deleted.

66 changes: 0 additions & 66 deletions plugins/postcss-nesting/.rollup.js

This file was deleted.

90 changes: 90 additions & 0 deletions plugins/postcss-nesting/.tape.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
const mixinPluginRule = () => {
return {
postcssPlugin: 'mixin',
AtRule: {
mixin(node) {
node.replaceWith('& .in{ &.deep { color: blue; }}')
},
},
}
}

mixinPluginRule.postcss = true

const mixinPluginRuleWithNesting = () => {
return {
postcssPlugin: 'mixin-with-nesting',
plugins: [mixinPluginRule(), require('./dist/index.cjs')()]
}
}

mixinPluginRuleWithNesting.postcss = true

const mixinPluginDeclaration = () => {
return {
postcssPlugin: 'mixin',
AtRule: {
mixin(node) {
node.replaceWith('color: blue;')
},
},
}
}

mixinPluginDeclaration.postcss = true

const mixinPluginDeclarationWithNesting = () => {
return {
postcssPlugin: 'mixin-with-nesting',
Once: () => {
throw new Error('bork');
},
plugins: [mixinPluginDeclaration(), require('./dist/index.cjs')()]
}
}

mixinPluginDeclarationWithNesting.postcss = true

module.exports = {
'basic': {
message: 'supports basic usage',
},
'complex': {
message: 'supports complex entries',
},
'direct': {
message: 'supports direct usage',
},
'at-rule': {
message: 'supports at-rule usage',
},
'container': {
message: 'supports nested @container',
},
'document': {
message: 'supports nested @document',
},
'media': {
message: 'supports nested @media',
},
'supports': {
message: 'supports nested @supports',
},
'empty': {
message: 'removes empty rules',
},
'ignore': {
message: 'ignores invalid entries',
},
'mixin-declaration': {
message: 'supports other visitors (mixin declaration)',
plugin: mixinPluginDeclarationWithNesting
},
'mixin-rule': {
message: 'supports other visitors (mixin rule)',
plugin: mixinPluginRuleWithNesting
},
'spec-examples': {
message: 'supports all spec examples',
},
};
Loading