Skip to content

Commit df79324

Browse files
committed
Support (and ignore) :host
Fix #33.
1 parent 85470bb commit df79324

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

cssselect2/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def _compile_node(selector):
279279
'focus-visible', 'target', 'target-within', 'current', 'past',
280280
'future', 'playing', 'paused', 'seeking', 'buffering',
281281
'stalled', 'muted', 'volume-locked', 'user-valid',
282-
'user-invalid'):
282+
'user-invalid', 'host'):
283283
# Not applicable in a static context: never match.
284284
return '0'
285285
elif selector.name in ('root', 'scope'):

tests/test_cssselect2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def test_lang():
301301
(':active', []),
302302
(':focus', []),
303303
(':target', []),
304+
(':host', []),
304305
(':enabled', [
305306
'link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked',
306307
'text-checked', 'input-hidden', 'checkbox-checked', 'area-href']),

0 commit comments

Comments
 (0)