Skip to content
New issue

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

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

Already on GitHub? # to your account

CSS Color Level 4 #81

Open
chiefss opened this issue Nov 3, 2022 · 3 comments
Open

CSS Color Level 4 #81

chiefss opened this issue Nov 3, 2022 · 3 comments

Comments

@chiefss
Copy link

chiefss commented Nov 3, 2022

This style throw exception com.inet.lib.less.LessException: Not supported Oprator ' ' for Expression '255 122 127 / .2'
background: rgb(255 122 127 / .2);

The Level 4 specification also allows for space-separated in addition to comma-separated values.

@Horcrux7
Copy link
Member

Horcrux7 commented Nov 4, 2022

If I look into documentation of lesscss I can't see that this is supported: https://lesscss.org/functions/#color-definition-rgb

Can you point me to the position where this is documented.

@chiefss
Copy link
Author

chiefss commented Nov 7, 2022

For example rgb():

CSS Colors Level 4 made some changes to rgb(). In browsers that support the standard rgba() is an alias for rgb(), they accept the same parameters and behave the same way.
The Level 4 specification also allows for space-separated in addition to comma-separated values.

https://www.w3.org/TR/css-color-4/
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb

Alsa with rgb(), rgba(), hsl(), hsla(), hwb(), lab(), lch(), oklab(), oklch(), color()

@Horcrux7
Copy link
Member

This is CSS syntax and not lesscss syntax. This are different things. If you want bypass an expression then you can escape it with:

background: e( "rgb(255 122 127 / .2)" );
or
background: ~"rgb(255 122 127 / .2)";

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

No branches or pull requests

2 participants