🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

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

Closed

Description

@Loirooriol

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.

Activity

  1. fantasai commented on Feb 5, 2024

    @fantasai
    Collaborator

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

  2. fantasai commented on Feb 5, 2024

    @fantasai
    Collaborator

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

  3. added
    Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.
    on Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions