Permalink
Browse files

!important is case-insensitive

  • Loading branch information...
SimonSapin committed Apr 5, 2012
1 parent 44b3496 commit 9e0eaadba81509689a74c086808a40ea57c47e1b
Showing with 2 additions and 2 deletions.
  1. +1 −1 tinycss/css21.py
  2. +1 −1 tinycss/tests/test_css21.py
View
@@ -809,7 +809,7 @@ def parse_value_priority(self, tokens):
value = list(tokens)
# Walk the token list from the end
token = value.pop()
- if token.type == 'IDENT' and token.value == 'important':
+ if token.type == 'IDENT' and token.value.lower() == 'important':
while value:
token = value.pop()
if token.type == 'DELIM' and token.value == '!':
@@ -219,7 +219,7 @@ def test_parse_style_attr(css_source, expected_declarations, expected_errors):
[('a', [('INTEGER', 1)], 'important'), ('b', [('INTEGER', 2)], None)],
[]),
- ('a:1!\t important; b:2',
+ ('a:1!\t Im\\50 O\\RTant; b:2',
[('a', [('INTEGER', 1)], 'important'), ('b', [('INTEGER', 2)], None)],
[]),

0 comments on commit 9e0eaad

Please sign in to comment.