cssutils icon indicating copy to clipboard operation
cssutils copied to clipboard

Implement CSS Colors level 4

Open jaraco opened this issue 3 years ago • 1 comments

In #28, a user reported an issue parsing colors with the / symbol in them. Here's a minimum reproducer:

python -m cssutils.scripts.cssparse -s '.any{color:rgb(0 0 0 / 0.4)}'
ERROR   COLOR_VALUE: Missing token for production end FUNC ")": ('CHAR', '/', 1, 22)
ERROR   PropertyValue: No match: ('CHAR', ')', 1, 27)
ERROR   PropertyValue: Unknown syntax or no value: rgb(0 0 0 / 0.4)
ERROR   CSSStyleDeclaration: Syntax Error in Property: color:rgb(0 0 0 / 0.4)
b''

jaraco avatar Nov 20 '22 17:11 jaraco

Apparently this syntax is part of CSS Colors Level 4. It would be great if someone would look into implementing this syntax and any other syntax required for colors level 4.

jaraco avatar Nov 20 '22 17:11 jaraco