mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #854 from Textualize/styles-css-property-fixes-updates
Fix issues with `Styles.css`, update "Grid" styles doc page
This commit is contained in:
@@ -123,6 +123,18 @@ def test_get_opacity_default():
|
||||
assert styles.text_opacity == 1.0
|
||||
|
||||
|
||||
def test_styles_css_property():
|
||||
css = "opacity: 50%; text-opacity: 20%; background: green; color: red; tint: dodgerblue 20%;"
|
||||
styles = Styles().parse(css, path="")
|
||||
assert styles.css == (
|
||||
"background: #008000;\n"
|
||||
"color: #FF0000;\n"
|
||||
"opacity: 0.5;\n"
|
||||
"text-opacity: 0.2;\n"
|
||||
"tint: rgba(30,144,255,0.2);"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"set_value, expected",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user