tiny-vue/examples/sites/tiny-uno/variants/select.js

15 lines
411 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// select:c-primary select:bg-black ::selection只可以应用于少数的CSS属性color, background
export default (matcher) => {
if (!matcher.startsWith('select:')) return matcher
return {
matcher: matcher.slice(7),
selector: (s) => `${s} ::selection`,
body: (body) => {
body.forEach((e) => {
e[1] && (e[1] += '!important')
})
return body
}
}
}