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
- Loading branch information
1 parent
e926548
commit 0035e2c
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> |