-
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.
[text-spacing-trim] Implement line-end logic
This patch implements the line-end logic of `text-spacing-trim` by applying the kerning only if it would not fit, as per the resolutions at: * w3c/csswg-drafts#9521 * w3c/csswg-drafts#9736 Bug: 1463891 Change-Id: I7b5b2ae43f47ce13c6eaad55a973292e82cc264f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5191602 Auto-Submit: Koji Ishii <[email protected]> Reviewed-by: Kent Tamura <[email protected]> Commit-Queue: Kent Tamura <[email protected]> Cr-Commit-Position: refs/heads/main@{#1246972}
- Loading branch information
1 parent
be1b4f8
commit 05918d6
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
css/css-text/text-spacing-trim/text-spacing-trim-end-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,19 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<script src="support/variant-class.js"></script> | ||
<style> | ||
@font-face { | ||
font-family: halt-font; | ||
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); | ||
} | ||
#container { | ||
font-family: halt-font; | ||
font-size: 20px; | ||
} | ||
.vrl { | ||
writing-mode: vertical-rl; | ||
} | ||
</style> | ||
<div id="container"> | ||
<div>国国国)<br>国国国)</div> | ||
</div> |
34 changes: 34 additions & 0 deletions
34
css/css-text/text-spacing-trim/text-spacing-trim-end-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,34 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> | ||
<link rel="match" href="text-spacing-trim-end-001-ref.html"> | ||
<script src="support/variant-class.js"></script> | ||
<meta name="variant" content="?class=halt,htb"> | ||
<meta name="variant" content="?class=chws,htb"> | ||
<meta name="variant" content="?class=halt,vrl"> | ||
<meta name="variant" content="?class=chws,vrl"> | ||
<style> | ||
@font-face { | ||
font-family: halt-font; | ||
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); | ||
} | ||
@font-face { | ||
font-family: chws-font; | ||
src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); | ||
} | ||
#container { | ||
font-family: halt-font; | ||
font-size: 20px; | ||
inline-size: 3.6em; | ||
text-spacing-trim: trim-start; | ||
} | ||
.chws #container { | ||
font-family: chws-font; | ||
} | ||
.vrl { | ||
writing-mode: vertical-rl; | ||
} | ||
</style> | ||
<div id="container"> | ||
<div>国国国)国国国)</div> | ||
</div> |