-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-pseudo] Don't inherit text-indent to ::marker
The CSSWG resolved in w3c/csswg-drafts#4568 that properties like 'text-indent' that don't apply to ::marker, should not be able to affect the ::marker via inheritance when set to an ancestor. Therefore, this patch sets 'text-indent: 0 !important' in UA origin. Bug: 1031667 TEST=external/wpt/css/css-pseudo/marker-content-023.html TEST=external/wpt/css/css-pseudo/marker-default-styles.html TEST=http/tests/devtools/elements/styles-2/pseudo-elements.js Change-Id: I4dd9e8afd448bd5fe237c084d3c0215e91560dd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382750 Reviewed-by: Rune Lillesveen <[email protected]> Reviewed-by: Koji Ishii <[email protected]> Commit-Queue: Oriol Brufau <[email protected]> Cr-Commit-Position: refs/heads/master@{#803126}
- Loading branch information
1 parent
15ff58a
commit 0bd1e7f
Showing
3 changed files
with
85 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Reference: ::marker pseudo elements styled with 'content' property</title> | ||
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]"> | ||
<style> | ||
.disc { | ||
list-style-type: disc; | ||
} | ||
.decimal { | ||
list-style-type: decimal; | ||
} | ||
.string { | ||
list-style-type: "3. "; | ||
} | ||
.content::marker { | ||
content: "4. "; | ||
} | ||
.rtl-marker ::marker { | ||
direction: rtl; | ||
} | ||
</style> | ||
<ol> | ||
<li class="disc"><div>disc</div></li> | ||
<li class="decimal"><div>decimal</div></li> | ||
<li class="string"><div>string</div></li> | ||
<li class="content"><div>content</div></li> | ||
</ol> | ||
<ol class="rtl-marker"> | ||
<li class="disc"><div>disc</div></li> | ||
<li class="decimal"><div>decimal</div></li> | ||
<li class="string"><div>string</div></li> | ||
<li class="content"><div>content</div></li> | ||
</ol> |
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,46 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Test: ::marker pseudo elements styled with 'content' property</title> | ||
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]"> | ||
<link rel="match" href="marker-content-023-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo"> | ||
<link rel="help" href="https://drafts.csswg.org/css-text/#text-indent-property"> | ||
<meta name="assert" content="Checks that 'text-indent' doesn't apply nor inherit to ::marker."> | ||
<style> | ||
li { | ||
text-indent: 100px; /* Should not be inherited by ::marker */ | ||
} | ||
::marker { | ||
text-indent: 100px; /* Should have no effect */ | ||
} | ||
li > div { | ||
text-indent: 0; | ||
} | ||
.disc { | ||
list-style-type: disc; | ||
} | ||
.decimal { | ||
list-style-type: decimal; | ||
} | ||
.string { | ||
list-style-type: "3. "; | ||
} | ||
.content::marker { | ||
content: "4. "; | ||
} | ||
.rtl-marker ::marker { | ||
direction: rtl; | ||
} | ||
</style> | ||
<ol> | ||
<li class="disc"><div>disc</div></li> | ||
<li class="decimal"><div>decimal</div></li> | ||
<li class="string"><div>string</div></li> | ||
<li class="content"><div>content</div></li> | ||
</ol> | ||
<ol class="rtl-marker"> | ||
<li class="disc"><div>disc</div></li> | ||
<li class="decimal"><div>decimal</div></li> | ||
<li class="string"><div>string</div></li> | ||
<li class="content"><div>content</div></li> | ||
</ol> |
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