Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selectors: Allow white space in the brackets of an attribute selector.
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/wpt/web-platform-tests/css/selectors/selectors-attr-white-space-001-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Selectors: White space in attribute selectors (reference)</title> | ||
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"/> | ||
<style> | ||
body { color: green; } | ||
</style> | ||
<p>This text should be green.</p> | ||
<p>This text should be green.</p> | ||
<p>This text should be green.</p> | ||
<p>This text should be green.</p> |
19 changes: 19 additions & 0 deletions
19
tests/wpt/web-platform-tests/css/selectors/selectors-attr-white-space-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>Selectors: White space in attribute selectors</title> | ||
<link rel="author" title="Cameron McCormack" href="mailto:cam@mcc.id.au"/> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-3/#w3cselgrammar"/> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-4/#grammar"/> | ||
<link rel="match" href="selectors-attr-white-space-001-ref.html"/> | ||
<style> | ||
body { color: red; } | ||
[ data-test-1] { color: green; } | ||
[data-test-2 ] { color: green; } | ||
[data-test-3 = x] { color: green; } | ||
[ |data-test-4] { color: green; } | ||
[ | data-test-4] { color: red; } | ||
</style> | ||
<p data-test-1="">This text should be green.</p> | ||
<p data-test-2="">This text should be green.</p> | ||
<p data-test-3="x">This text should be green.</p> | ||
<p data-test-4="">This text should be green.</p> |