-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[counter-style] Add a test for styling list markers via shadow DOM part
Note: this test case is the same as example FOUR in w3c/csswg-drafts#1995 (comment) Bug: 1225033 Change-Id: Ic02c6c0e9c623c4eb12ac4bc152716f63f6ebd52 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3025847 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/master@{#901552}
- Loading branch information
1 parent
04ab41d
commit 0993872
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
css/css-counter-styles/counter-styles-shadow-dom-part-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,8 @@ | ||
<!DOCTYPE html> | ||
|
||
<ol> | ||
<div>A.</div> | ||
<div>B.</div> | ||
<div>C.</div> | ||
</ol> | ||
|
35 changes: 35 additions & 0 deletions
35
css/css-counter-styles/counter-styles-shadow-dom-part.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,35 @@ | ||
<!DOCTYPE html> | ||
<title>Counter style tree-scoped references</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-counter-styles-3/#the-counter-style-rule"> | ||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#shadow-names"> | ||
<link rel="author" href="mailto:[email protected]"> | ||
<link rel="match" href="counter-styles-shadow-dom-part-ref.html"> | ||
<meta name="assert" content="The list in the shadow tree should use the counter style defined in the outer document, because it's styled by the outer document"> | ||
|
||
<style> | ||
@counter-style foo { | ||
system: fixed; | ||
symbols: A B C; | ||
} | ||
#host::part(list) { | ||
list-style-type: foo; | ||
} | ||
</style> | ||
|
||
<div id="host"></div> | ||
|
||
<script> | ||
document.getElementById("host").attachShadow({mode: 'open'}).innerHTML = ` | ||
<style> | ||
@counter-style foo { | ||
system: fixed; | ||
symbols: D E F; | ||
} | ||
</style> | ||
<ol part="list" style="list-style-position: inside"> | ||
<li></li> | ||
<li></li> | ||
<li></li> | ||
</ol> | ||
`; | ||
</script> |