Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unocss/transformer-variant-group

Package Overview
Dependencies
Maintainers
2
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/transformer-variant-group

Variant group transformer for UnoCSS

  • 0.62.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
193K
decreased by-0.77%
Maintainers
2
Weekly downloads
 
Created

What is @unocss/transformer-variant-group?

@unocss/transformer-variant-group is a transformer for UnoCSS that allows you to group variant utilities together, making your CSS more concise and easier to read.

What are @unocss/transformer-variant-group's main functionalities?

Grouping Variants

This feature allows you to group multiple variant utilities together. In this example, the `hover` and `focus` variants are grouped to apply different background and text colors when the element is hovered or focused.

```html
<div class="hover:(bg-blue-500 text-white) focus:(bg-red-500 text-black)">
  Hover or focus on me!
</div>
```

Nested Variants

This feature allows you to nest variants within responsive breakpoints. In this example, the `sm:hover` and `md:focus` variants are nested to apply different styles based on screen size and interaction state.

```html
<div class="sm:hover:(bg-green-500 text-white) md:focus:(bg-yellow-500 text-black)">
  Responsive hover and focus!
</div>
```

Other packages similar to @unocss/transformer-variant-group

Keywords

FAQs

Package last updated on 12 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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