Skip to content

Commit

Permalink
text-emphasis: Do not paint emphasis marks on punctuations
Browse files Browse the repository at this point in the history
* Do not paint emphasis marks on punctuations
* Do not use IDEOGRAPHIC FULL STOP for text-combine placeholder
  It's a punctuation.  Use HIRAGANA LETTER A instead.
* Do not paint emphasis marks on generated ellipsis symbols just in case
  It's always a punctuation now. But we might support arbitrary string
  in the future.

* Update text-emphasis-punctuation-1.html so that it uses Ahem font
  Without this change, the test had pixel glitches on Chromium.

The new behavior matches to Firefox.

https://drafts.csswg.org/css-text-decor/#text-emphasis-style-property

Bug: 359420112
Change-Id: If93ef6190e739a0cf64d3becb24c41191dbe1100
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108987
Commit-Queue: Koji Ishii <[email protected]>
Auto-Submit: Kent Tamura <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400253}
  • Loading branch information
tkent-google authored and chromium-wpt-export-bot committed Dec 26, 2024
1 parent e8ba63b commit 7f001e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion css/css-text-decor/text-emphasis-punctuation-1-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<meta charset="utf-8">
<title>CSS text decoration test: emphasis marks and punctuation</title>

<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
.ahem { font-family: Ahem; }
span { text-emphasis: filled circle; }
</style>

<p>The punctuation should <b>not</b> have emphasis marks:</p>
<p><span>Abc</span> (<span>def</span>) <span>gh</span>? <span>Ijk</span>.
<p class="ahem"><span>Abc</span> (<span>def</span>) <span>gh</span>? <span>Ijk</span>.
<span>Lm</span>, <span>n</span>-<span>op</span>!
[<span>Qrst</span><span>uv</span>] <span>wx</span>/<span>yz</span>.</p>
3 changes: 2 additions & 1 deletion css/css-text-decor/text-emphasis-punctuation-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<link rel="help" href="https://drafts.csswg.org/css-text-decor/#text-emphasis-style-property">
<meta name="assert" content="emphasis marks are not drawn for punctuation (with a small set of exceptions)">

<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
.emph { text-emphasis: filled circle; }
.emph { text-emphasis: filled circle; font-family: Ahem; }
</style>

<p>The punctuation should <b>not</b> have emphasis marks:</p>
Expand Down

0 comments on commit 7f001e1

Please sign in to comment.