Skip to content

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

Closed
@Loirooriol

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions