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

parsing failure with border shorthand and css4 hsl() color #89

Open
phiw13 opened this issue Apr 19, 2023 · 0 comments
Open

parsing failure with border shorthand and css4 hsl() color #89

phiw13 opened this issue Apr 19, 2023 · 0 comments

Comments

@phiw13
Copy link

phiw13 commented Apr 19, 2023

clean-css drops the color parameter in a border short-hand when the color is specified using css4 comma-less translucent hsl() – and possibly other color formats such as rgb() / hwb / but I have not tested those.

input: border-top: 1em solid hsl(0 5% 5% / .5);

actual output: border-top:1em solid;

expected output: border-top:1em solid hsl(0 5% 5% / .5);

The border shorthand can be anything of border or border-top, etc. Surprisingly, the logical equivalent (e.g. border-block-start) seems to parse correctly.

cleancss -d -O2 --format 'breaks:afterComment=on' -o style.min.css style.css

clean-css-cli version: 5.6.2
macOS 13.3.1

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