Skip to content

Commit 960275c

Browse files
committed
Add container classes as utilities not components
Just for now so that this feature can be introduced into the codebase without forcing a BC break. The container classes will eventually be moved to a built-in plugin that adds them as components.
1 parent 6849818 commit 960275c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

__tests__/fixtures/tailwind-input.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@tailwind preflight;
22

3-
@tailwind components;
4-
53
@tailwind utilities;
64

75
@responsive {

src/lib/substituteTailwindAtRules.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,12 @@ export default function(config) {
2121
}
2222

2323
if (atRule.params === 'components') {
24-
const tailwindComponentTree = postcss.root({
25-
nodes: container(unwrappedConfig),
26-
})
27-
2824
const pluginComponentTree = postcss.root({
2925
nodes: pluginComponents,
3026
})
3127

32-
prefixTree(tailwindComponentTree, unwrappedConfig.options.prefix)
33-
34-
tailwindComponentTree.walk(node => (node.source = atRule.source))
3528
pluginComponentTree.walk(node => (node.source = atRule.source))
3629

37-
atRule.before(tailwindComponentTree)
3830
atRule.before(pluginComponentTree)
3931
atRule.remove()
4032
}
@@ -47,7 +39,7 @@ export default function(config) {
4739
}
4840

4941
const tailwindUtilityTree = postcss.root({
50-
nodes: utilities.nodes,
42+
nodes: [...container(unwrappedConfig), ...utilities.nodes],
5143
})
5244

5345
const pluginUtilityTree = postcss.root({

0 commit comments

Comments
 (0)