mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Checking empty rules
This commit is contained in:
@@ -23,6 +23,17 @@ def test_stylesheet_apply_takes_final_rule_in_specificity_clash():
|
|||||||
assert node.styles.background == Color(0, 0, 255) # background: blue
|
assert node.styles.background == Color(0, 0, 255) # background: blue
|
||||||
|
|
||||||
|
|
||||||
|
def test_stylesheet_apply_empty_rules():
|
||||||
|
css = ".a {} .b {}"
|
||||||
|
|
||||||
|
stylesheet = Stylesheet()
|
||||||
|
stylesheet.source["test.css"] = css
|
||||||
|
stylesheet.parse()
|
||||||
|
|
||||||
|
node = DOMNode(classes="a b")
|
||||||
|
stylesheet.apply(node)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"css_value,expectation,expected_color",
|
"css_value,expectation,expected_color",
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user