mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Revert apply defaults in isolation
This commit is contained in:
parent
5f49e53aba
commit
9fdc391d4f
@ -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…
x
Reference in New Issue
Block a user