mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Style fixes
This commit is contained in:
parent
ac8099251f
commit
2feac441e7
@ -10,19 +10,18 @@ test('plugins can create utilities', () => {
|
||||
const [components, utilities] = processPlugins({
|
||||
plugins: [
|
||||
function({ rule, addUtilities }) {
|
||||
addUtilities(
|
||||
[
|
||||
rule('.object-fill', {
|
||||
'object-fit': 'fill',
|
||||
}),
|
||||
rule('.object-contain', {
|
||||
'object-fit': 'contain',
|
||||
}),
|
||||
rule('.object-cover', {
|
||||
'object-fit': 'cover',
|
||||
}),
|
||||
addUtilities([
|
||||
rule('.object-fill', {
|
||||
'object-fit': 'fill',
|
||||
}),
|
||||
rule('.object-contain', {
|
||||
'object-fit': 'contain',
|
||||
}),
|
||||
rule('.object-cover', {
|
||||
'object-fit': 'cover',
|
||||
}),
|
||||
])
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@ -57,8 +56,10 @@ test('plugins can create utilities with variants', () => {
|
||||
rule('.object-cover', {
|
||||
'object-fit': 'cover',
|
||||
}),
|
||||
], ['responsive', 'hover', 'group-hover', 'focus'])
|
||||
}
|
||||
],
|
||||
['responsive', 'hover', 'group-hover', 'focus']
|
||||
)
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@ -93,7 +94,7 @@ test('plugins can create components', () => {
|
||||
'background-color': 'darkblue',
|
||||
}),
|
||||
])
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@ -135,7 +136,7 @@ test('plugins can create components with media queries', () => {
|
||||
}),
|
||||
]),
|
||||
])
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
@ -418,7 +419,7 @@ test("plugins can apply the user's chosen prefix", () => {
|
||||
`)
|
||||
})
|
||||
|
||||
test("utilities are escaped and automatically respect prefix and important options when created via `utility`", () => {
|
||||
test('utilities are escaped and automatically respect prefix and important options when created via `utility`', () => {
|
||||
const [, utilities] = processPlugins({
|
||||
plugins: [
|
||||
function({ utility, addUtilities }) {
|
||||
|
||||
@ -20,7 +20,10 @@ function defineUtility(selector, properties, options) {
|
||||
return defineUtility(selector.slice(1), properties, options)
|
||||
}
|
||||
|
||||
const rule = defineRule(prefixSelector(options.prefix, `.${escapeClassName(selector)}`), properties)
|
||||
const rule = defineRule(
|
||||
prefixSelector(options.prefix, `.${escapeClassName(selector)}`),
|
||||
properties
|
||||
)
|
||||
|
||||
if (options.important) {
|
||||
rule.walkDecls(decl => (decl.important = true))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user