Skip to content

Commit

Permalink
allow asterisk tag selector
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoSchleicher committed Sep 18, 2017
1 parent 319d92f commit 9cb1371
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/StyleSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ public indirect enum StyleSelector {
case .className:
matches = element.classNames?.contains(value) ?? false
case .tag:
matches = element.tagName == value
if(value == "*"){
matches = true
} else {
matches = element.tagName == value
}
case .attributeExact:
if let data = data, let attribute = data.attribute, let value = data.value {
matches = element.has(attribute: attribute, with: value)
Expand Down

0 comments on commit 9cb1371

Please sign in to comment.