Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better grouping for identical value pseudo rules #20

Open
Zn4rK opened this issue Nov 13, 2023 · 0 comments
Open

Better grouping for identical value pseudo rules #20

Zn4rK opened this issue Nov 13, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Zn4rK
Copy link
Contributor

Zn4rK commented Nov 13, 2023

const x = style({
  '&:hover': {
    background: 'red',
  }
});

const x2 = style({
  '&:active': {
    background: 'red',
  }
});

Will produce the following css:

.a1:hover {
  background: red;
}

.b1:active {
  background: red;
}

But it could produce the following CSS to save a few bytes:

.a1:hover, .b1:active {
   background: red;
}
@Zn4rK Zn4rK added enhancement New feature or request good first issue Good for newcomers labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant