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

13 lines
300 B
JavaScript

// hover: h:c-error
export default (matcher) => {
if (!matcher.startsWith('h:')) return matcher
return {
matcher: matcher.slice(2),
selector: (s) => `${s}:hover`,
body: (body) => {
body.push(['transition', 'all var(--trans-time)'])
return body
}
}
}