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

Require use of logical viewport units #38

Open
thewilkybarkid opened this issue Feb 2, 2023 · 0 comments
Open

Require use of logical viewport units #38

thewilkybarkid opened this issue Feb 2, 2023 · 0 comments

Comments

@thewilkybarkid
Copy link
Contributor

PostCSS now has support for some of the logical viewport units (@csstools/postcss-logical-viewport-units); it'd be useful to be able to enforce these too (though they come from a difference spec).

I'm aware of the unit-disallowed-list rule (which could be used to disable vh, vw etc.), but that doesn't provide a fixer.

Refs stylelint/stylelint#6428

thewilkybarkid added a commit to PREreview/prereview.org that referenced this issue Feb 2, 2023
postcss-preset-env added a plugin for logical viewport units, which we should use to avoid mixing logical properties and physical units.

Stylelint doesn't yet have a way to enforce these through linting, only a disallow list. I've chosen not to go down this route (with a fixer), as Utopia (https://utopia.fyi/) produces physical units: it would have to be a manual step to replace them each time.

Refs #616, Jordan-Hall/stylelint-use-logical-spec#38, https://stylelint.io/user-guide/rules/unit-disallowed-list
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

No branches or pull requests

1 participant