Enable shadowLookup by default

This commit is contained in:
Adam Wathan 2018-09-21 14:50:40 -04:00
parent 7a5bc97008
commit 750b62c5d2
2 changed files with 2 additions and 9 deletions

View File

@ -182,12 +182,7 @@ test('you can apply utility classes that do not actually exist as long as they w
.foo { margin-top: 1rem; }
`
const config = {
...defaultConfig,
experiments: { shadowLookup: true },
}
return run(input, config).then(result => {
return run(input).then(result => {
expect(result.css).toEqual(expected)
expect(result.warnings().length).toBe(0)
})

View File

@ -55,9 +55,7 @@ function findClass(classToApply, classTable, onError) {
export default function(config, generatedUtilities) {
return function(css) {
const classLookup = buildClassTable(css)
const shadowLookup = _.get(config, 'experiments.shadowLookup', false)
? buildShadowTable(generatedUtilities)
: {}
const shadowLookup = buildShadowTable(generatedUtilities)
css.walkRules(rule => {
rule.walkAtRules('apply', atRule => {