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

[css2][css-content] close-quote refers to wrong quote pair #2506

Closed
Loirooriol opened this issue Apr 5, 2018 · 2 comments
Closed

[css2][css-content] close-quote refers to wrong quote pair #2506

Loirooriol opened this issue Apr 5, 2018 · 2 comments
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-content-3

Comments

@Loirooriol
Copy link
Contributor

Loirooriol commented Apr 5, 2018

CSS 2 and CSS content say

'Open-quote' refers to the first of a pair of quotes, 'close-quote' refers to the second. Which pair of quotes is used depends on the nesting level of quotes: the number of occurrences of 'open-quote' in all generated text before the current occurrence, minus the number of occurrences of 'close-quote'. If the depth is 0, the first pair is used, if the depth is 1, the second pair is used, etc.

Not sure if I'm missing something, but consider this simple example:

<div></div>
div { quotes: "[1." ".1]" "[2." ".2]" }
div::before { content: open-quote }
div::after { content: close-quote }
div::before div::after
Previous occurrences of open-quote 0 1
Previous occurrences of close-quote 0 0
Depth 0 - 0 = 0 1 - 0 = 1
Pair used "[1." ".1]" "[2." ".2]"
Generated content [1. .2]

So reading the spec I expect [1..2] but obviously it should be [1..1].

Probably close-quote should also count the current occurrence when determining the depth.

@fantasai
Copy link
Collaborator

fantasai commented Feb 5, 2024

@Loirooriol Fixed in 9d65fd3 lmk if that works for you? :)

@fantasai
Copy link
Collaborator

fantasai commented Feb 5, 2024

(Or actually, just close the issue if it's OK.)

@Loirooriol Loirooriol added the Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-content-3
Projects
None yet
Development

No branches or pull requests

3 participants