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

AZZ replaced with A9Z #13178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kritisingh1
Copy link
Member

@kritisingh1 kritisingh1 commented Sep 23, 2018

Fixes #13066
@TalbotG please review. Thanks!

@TalbotG
Copy link
Contributor

TalbotG commented Sep 24, 2018

@frivoal is the appropriate and best person to review and merge your pull request, kritisingh1. It is really preferable that Florian reviews and merges this. Florian is author of the css-contain spec and author of the quote-scoping-002 test.

@frivoal
Copy link
Contributor

frivoal commented Sep 27, 2018

Thanks. We should indeed fix the difference between the test and the reference. However, it seems to me that the reference is the correct one, not the test, so they should both be fixed to read AZZ.

From the spec:

The effects of the content property’s open-quote, close-quote, no-open-quote and no-close-quote must be scoped to the element’s sub-tree.

Note: This implies that the depth of quote nesting in the subtree is unchanged and starts at the value that its context normally implies, but that changes to the depth of quote nesting by these values inside the subtree do not affect the depth of quote nesting outside the subtree.

There's only 1 open-quote, so it must yield A. Then the close-quote on span::after yields the corresponding Z. But since it is inside of the style containment, it does not affect what div::after sees, so that one too yields a Z.

Do you think I am getting this wrong?

@frivoal frivoal self-assigned this Sep 27, 2018
@TalbotG
Copy link
Contributor

TalbotG commented Sep 27, 2018

I have examined section 12.2 ('content' property) and section 12.3.1 ('quotes' property) and this is much harder than I thought.

The quote-scoping-002 test as edited does not declare
span::before {content: no-open-quote}
when it seems (I am not entirely sure) that it should.

I propose these 2 test replacements (otherwise, additions):

contain-style-quotes-060 test

contain-style-quotes-061 test

@TalbotG
Copy link
Contributor

TalbotG commented Sep 27, 2018

There's only 1 open-quote, so it must yield A. Then the close-quote on span::after yields the corresponding Z. But since it is inside of the style containment, it does not affect what div::after sees, so that one too yields a Z. Do you think I am getting this wrong?

I think you get this correct.

What "bugs" me is that the span's close-quote value of the content property does not require 'contain: style' anyway in order to be scoped to the element's subtree ...

@TalbotG
Copy link
Contributor

TalbotG commented Sep 27, 2018

Argh.... I am still confused. I need to understand the note from the spec you quoted...

@frivoal
Copy link
Contributor

frivoal commented Sep 28, 2018

The quote-scoping-002 test as edited does not declare span::before {content: no-open-quote} when it seems (I am not entirely sure) that it should.

I do think it would be fairly unusual for a piece of content to be marked-up / styled this way, but tests don't need to be semantically interesting, merely to be correct.

With the markup as it is, the result is defined to be AZZ.

I propose these 2 test replacements (otherwise, additions)

These two seem correct, but I don't think they're useful. Unless I misunderstand something, they would work just as well if you had no containment.

I am still confused. I need to understand the note from the spec you quoted...

Basically, open-quote (resp. close-quote) does two things:

  1. display the correct string for the current quote level
  2. increase (resp. decrease) the quote level

The first effect is not at all changed by style containment.

The second effect is: open-quote and close-quote inside a style-contained subtree increase and decrease a locally scoped copy of the quote-level. To the world outside of the scoped subtree, it doesn't matter how many open-quote and close-quote happened inside that subtree and whether they were well paired or not, it is as if nothing happened.

What "bugs" me is that the span's close-quote value of the content property does not require 'contain: style' anyway in order to be scoped to the element's subtree ...

That's kind of the point of the test. Outside of the subtree, there is one open-quote, one close-quote, so they respectively generate and A and a Z, regardless of what's going on in the scoped subtree. In this case, the number of open-quote and close-quote in the subtree are not balanced, and the test checks that this has no effect on the close-quote outside/after the subtree.

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