Merge pull request #459 from Textualize/expanded-css-hex-support

Support 3 and 4 character hex strings for colours
This commit is contained in:
Darren Burns
2022-05-04 10:23:54 +01:00
committed by GitHub
5 changed files with 29 additions and 8 deletions

View File

@@ -32,8 +32,6 @@ from textual.css.tokenizer import TokenizeError
["red 4", pytest.raises(StylesheetParseError), None], # space in it
["1", pytest.raises(StylesheetParseError), None], # invalid value
["()", pytest.raises(TokenizeError), None], # invalid tokens
# TODO: implement hex colors with 3 chars? @link https://devdocs.io/css/color_value
["#09f", pytest.raises(TokenizeError), None],
# TODO: allow spaces in rgb/rgba expressions?
["rgb(200, 90, 30)", pytest.raises(TokenizeError), None],
["rgba(200,90,30, 0.4)", pytest.raises(TokenizeError), None],