Socket
Socket
Sign inDemoInstall

unocss

Package Overview
Dependencies
Maintainers
1
Versions
371
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unocss - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

10

package.json
{
"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:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc