Skip to content

Conversation

@himorin
Copy link
Contributor

@himorin himorin commented Jan 21, 2020

This is from discussions and contributions from JLReq TF members.

  • text-indent/text-indent-hanging-each_line-001.html aims to each-line, but has dependency to hanging, is this better to be updated for removing dependency (if possible)?
  • some text-spacing tests has false positive (test passes even at this moment without implementation), is it better to consider some additional line or test (if any)?
  • porting to wpt could be done with visual test (or divided into ref test), with resolving above points (AFAIU)

/cc @takase-est @JunTajima

himorin and others added 24 commits November 15, 2019 17:58
- 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
@himorin himorin requested review from r12a and xfq January 21, 2020 16:05
#test, #ref {
position:absolute; top:0;
font-family: webfont;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful to add a /* the CSS above is not part of the test */ line after this line, like other i18n tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really thank you for pointing this! This point was dropped from my last-time check list...

@himorin himorin requested a review from xfq July 2, 2021 14:36
@himorin
Copy link
Contributor Author

himorin commented Jul 2, 2021

@r12a @xfq @kidayasuo requesting review on this PR for css-text text-spacing property tests.
As for now, no-compress is missing, failed to build one...

@himorin
Copy link
Contributor Author

himorin commented Jul 6, 2021

(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.

  • when text-spacing itself is not implemented: space-end will be false positive, but others like allow-end will fail
  • when text-spacing: normal is implemented, but space-end is not: test for space-end specifies text-spacing: space-end and will behave as normal, current test for space-end could success since it compares one with space-end and one with 1em inline-block but just for typographic comparison. might need to change test with background-color
  • when implemented: test should success

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">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

editorial suggestion: text-indent:hanging indents all lines except the first

#ref {
width: 15em;
padding-left: 5em;
text-indent: -5em;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@himorin
Copy link
Contributor Author

himorin commented Jul 7, 2021

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...
Let me check these two tests.

@himorin
Copy link
Contributor Author

himorin commented Jul 12, 2021

@r12a updated tests on text-indent for hanging and each-line.

  • hanging-001 : updated for current one
  • hanging-002 : test including forced line break
  • each-line-001 : test only with each-line
  • each-line-002 : test with each-line and hanging

@xfq
Copy link
Member

xfq commented Mar 13, 2023

This PR probably needs updating, since text-spacing has been refactored recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants