Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-text-3] Tests for percentage text indent #11373

Merged
merged 3 commits into from
Oct 8, 2018

Conversation

frivoal
Copy link
Contributor

@frivoal frivoal commented Jun 6, 2018

Relates to the spec changes decided in
w3c/csswg-drafts#2394

<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property">
<meta name="flags" content="">
<link rel="match" href="reference/text-indent-percentage-002-ref.html">
<meta name="assert" content="Percentages in text-indent refer to width of the element's content box">
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Spurious tab, here & in the other test.

box-sizing: border-box;
width: 120px;
}
.test div { text-indent: 50%; color: red; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a bug on file for whichever browser this is referring to?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the browser is Gecko looking at the test locally. I'm not sure what's going on there. I'd file and cc @MatsPalmgren who is looking at fixing calc().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I planned to file the bug after the test got approved, but @MatsPalmgren did it first

width: 120px;
}
.test div { text-indent: 50%; color: red; overflow: hidden; } /* overflow:hidden should not make any difference, but it does in some browsers */
.ref div { text-indent: 50px; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could a test for calc(px + %) be added if it's not too much of a hassle? That's a case that gecko gets wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How is that: d25a341 ?

@MatsPalmgren
Copy link

@frivoal frivoal merged commit e124e16 into web-platform-tests:master Oct 8, 2018
@frivoal frivoal deleted the css-text-2394 branch October 8, 2018 23:23
frivoal added a commit to frivoal/wpt that referenced this pull request Oct 15, 2018
As described in https://bugzilla.mozilla.org/show_bug.cgi?id=1498698#c1
The tests introduced in web-platform-tests#11373
fail due to anti aliasing issues that let some red show through at the edges
even when things are correctly aligned and the red should be hidden.

Rework these tests to avoid the problem.
@szager-chromium
Copy link
Contributor

It appears that this preexisting test checks for the old behavior:

css/css-text/text-indent/text-indent-percentage-001.xht

Are you planning to update it?

@frivoal
Copy link
Contributor Author

frivoal commented Nov 1, 2018

handled in #13721

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

Successfully merging this pull request may close these issues.

4 participants