Add tests on properties of text-spacing and hanging/each-line of text-indent#23
Add tests on properties of text-spacing and hanging/each-line of text-indent#23himorin wants to merge 30 commits intow3c:gh-pagesfrom
Conversation
- allow-end - space-end - trim-end
merging text-spacing-x-end branch, for discussion/update in one branch from master
…ests style, like class=test/ref could be better to use span for ref one
| #test, #ref { | ||
| position:absolute; top:0; | ||
| font-family: webfont; | ||
| } |
There was a problem hiding this comment.
It might be useful to add a /* the CSS above is not part of the test */ line after this line, like other i18n tests.
There was a problem hiding this comment.
Really thank you for pointing this! This point was dropped from my last-time check list...
|
@r12a @xfq @kidayasuo requesting review on this PR for css-text text-spacing property tests. |
|
(record from discussion with @kidayasuo ) For space-end, it is the same behavior as current (setting all as full-width), so there could be false positive with this PR.
hrm,, does above correct?? |
| <meta charset="utf-8"> | ||
| <title>CSS Text: text-indent: hanging</title> | ||
| <meta name="flags" content="font"> | ||
| <meta name="assert" id="assert" content="text-indent: hanging makes all lines except the first line as indented"> |
There was a problem hiding this comment.
editorial suggestion: text-indent:hanging indents all lines except the first
| #ref { | ||
| width: 15em; | ||
| padding-left: 5em; | ||
| text-indent: -5em; |
There was a problem hiding this comment.
I don't think you should use text-indent for styling the ref text. If it doesn't work, the test will fail because the ref file was incorrect. Given that this is using a fixed-width font, where each glyph is 1em wide, perhaps it would be better to create the ref text with line breaks at the end of each line and 5 space characters at the beginning of each line except the first. Also, you won't need to set the width to 15em or pad that way.
| <style> | ||
| @font-face { | ||
| font-family: 'webfont'; | ||
| src: url('../../../fonts/ahem-extra/AHEM_default.TTF') format('opentype'); |
There was a problem hiding this comment.
There seems to be one too many ../ here.
| <p class="instructions">Test passes if there is no red visible on the page.</p> | ||
|
|
||
| <div style="position:relative"> | ||
| <div id="test">XXXX pppp XXXX pppp XXXX pppp XXXX pppp XXXX</div> |
There was a problem hiding this comment.
I don't think this test works.
Ideally, the green would show up in the gaps at the start of the 2nd & 3rd lines.
Perhaps the ref text would be something like:
<div id="ref"><span class="red">XXXX</span> XXXX XXXX XXXX<br><span class="green">XXXX</span> XXXX XXXX XXXX<br><span class="green">XXXX</span> XXXX</div>
And the test would be that the green block is visible, but no red. The colour of the test text should not be green.
|
Thank you for review comments. I've found that I've totally forgot about text-indent ones (only checked and discussed on text-spacing recently...) and also it seems I haven't checked well on merging to this PR from original branch... |
|
@r12a updated tests on text-indent for hanging and each-line.
|
|
This PR probably needs updating, since |
This is from discussions and contributions from JLReq TF members.
/cc @takase-est @JunTajima