Comparing version 0.1.5 to 0.2.0
{ | ||
"name": "unocss", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -36,6 +36,6 @@ "keywords": [], | ||
"dependencies": { | ||
"@unocss/core": "0.1.5", | ||
"@unocss/preset-attributify": "0.1.5", | ||
"@unocss/preset-uno": "0.1.5", | ||
"@unocss/vite": "0.1.5" | ||
"@unocss/core": "0.2.0", | ||
"@unocss/preset-attributify": "0.2.0", | ||
"@unocss/preset-uno": "0.2.0", | ||
"@unocss/vite": "0.2.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
@@ -293,6 +293,12 @@ # UnoCSS | ||
variants: [ | ||
{ | ||
match: s => s.startsWith('hover:') ? s.slice(6) : null, | ||
selector: s => `${s}:hover`, | ||
}, | ||
// hover: | ||
(matcher) => { | ||
if (!matcher.startsWith('hover:')) | ||
return matcher | ||
return { | ||
// slice `hover:` prefix and passed to the next variants and rules | ||
matcher: matcher.slice(6), | ||
selector: s => `${s}:hover`, | ||
} | ||
} | ||
], | ||
@@ -315,3 +321,3 @@ rules: [ | ||
- our first rule get matched and generates `.m-2 { margin: 0.5rem; }` | ||
- finally, we apply our variants transformation to the generated CSS. In this case, we prepended `:hover` to the selector | ||
- finally, we apply our variants transformation to the generated CSS. In this case, we prepended `:hover` to the `selector` hook | ||
@@ -318,0 +324,0 @@ As a result, the following CSS will be generated: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16392
372
+ Added@unocss/config@0.2.0(transitive)
+ Added@unocss/core@0.2.0(transitive)
+ Added@unocss/preset-attributify@0.2.0(transitive)
+ Added@unocss/preset-uno@0.2.0(transitive)
+ Added@unocss/scope@0.2.0(transitive)
+ Added@unocss/vite@0.2.0(transitive)
- Removed@unocss/config@0.1.5(transitive)
- Removed@unocss/core@0.1.5(transitive)
- Removed@unocss/preset-attributify@0.1.5(transitive)
- Removed@unocss/preset-uno@0.1.5(transitive)
- Removed@unocss/scope@0.1.5(transitive)
- Removed@unocss/vite@0.1.5(transitive)
Updated@unocss/core@0.2.0
Updated@unocss/preset-uno@0.2.0
Updated@unocss/vite@0.2.0