Revert apply defaults in isolation
This commit is contained in:
parent
5f49e53aba
commit
9fdc391d4f
2 changed files with 9 additions and 7 deletions
|
|
@ -140,7 +140,7 @@ export default function expandTailwindAtRules(context) {
|
|||
variants: null,
|
||||
}
|
||||
|
||||
let hasApply = false
|
||||
// let hasApply = false
|
||||
|
||||
root.walkAtRules((rule) => {
|
||||
// Make sure this file contains Tailwind directives. If not, we can save
|
||||
|
|
@ -156,12 +156,12 @@ export default function expandTailwindAtRules(context) {
|
|||
// We also want to check for @apply because the user can
|
||||
// apply classes in an isolated environment like CSS
|
||||
// modules and we still need to inject defaults
|
||||
if (rule.name === 'apply') {
|
||||
hasApply = true
|
||||
}
|
||||
// if (rule.name === 'apply') {
|
||||
// hasApply = true
|
||||
// }
|
||||
})
|
||||
|
||||
if (Object.values(layerNodes).every((n) => n === null) && !hasApply) {
|
||||
if (Object.values(layerNodes).every((n) => n === null)) {
|
||||
return root
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { DEFAULTS_LAYER } from '../src/lib/expandTailwindAtRules.js'
|
||||
// import { DEFAULTS_LAYER } from '../src/lib/expandTailwindAtRules.js'
|
||||
|
||||
import { run, html, css } from './util/run'
|
||||
|
||||
|
|
@ -812,7 +812,8 @@ it('should be possible to apply user css without tailwind directives', () => {
|
|||
})
|
||||
})
|
||||
|
||||
fit('apply can emit defaults in isolated environments without @tailwind directives', () => {
|
||||
/*
|
||||
it('apply can emit defaults in isolated environments without @tailwind directives', () => {
|
||||
let config = {
|
||||
[DEFAULTS_LAYER]: true,
|
||||
experimental: { optimizeUniversalDefaults: true },
|
||||
|
|
@ -847,3 +848,4 @@ fit('apply can emit defaults in isolated environments without @tailwind directiv
|
|||
`)
|
||||
})
|
||||
})
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue