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

Autofix produces erroneous code #31

Open
kaevupoiss opened this issue Nov 1, 2024 · 1 comment · May be fixed by #34
Open

Autofix produces erroneous code #31

kaevupoiss opened this issue Nov 1, 2024 · 1 comment · May be fixed by #34

Comments

@kaevupoiss
Copy link

kaevupoiss commented Nov 1, 2024

This plugin combines declarations into shorthands:

inset-block-start: 10px;
inset-block-end: 15px;
inset-inline-start: 20px;
inset-inline-end: 25px;

/* becomes */

inset-block: 10px 15px;
inset-inline: 20px 25px;

But the following case is not supported by browsers and as a consequence break the styles.

inset-block-start: unset;
inset-block-end: 15px;
inset-inline-start: 20px;
inset-inline-end: unset;

/* becomes */

inset-block: unset 15px;
inset-inline: 20px unset;

What to do:

  • Check declarations for these global values: inherit, initial, revert, revert-layer and unset. Do not merge if any of them includes these.
@zfeher
Copy link

zfeher commented Mar 13, 2025

Created a PR for this, hopefully gets merged and released someday :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants