- 
                Notifications
    
You must be signed in to change notification settings  - Fork 22.9k
 
Closed
Labels
Content:CSSCascading Style Sheets docsCascading Style Sheets docshelp wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/sibling-index
What specific section or headline is this issue about?
https://developer.mozilla.org/en-US/docs/Web/CSS/sibling-index#css_2
What information was incorrect, unhelpful, or incomplete?
Incorrect sample
div {
  --list-index: sibling-index();
  display: flex;
  gap: 1ch;
}
div::before {
  content: var(--list-index);
}sibling-index returns number value, and content  property avail only string, so this sample not working. element ::before not created.
What did you expect to see?
I expect fix this, for example use counters
div {
  --list-index: sibling-index();
  display: flex;
  gap: 1ch;
  
}
div::before {
  counter-set: c var(--list-index);
  content: counter(c);
}Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder: 
en-us/web/css/sibling-index - MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/sibling-index
 - GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/sibling-index/index.md
 - Last commit: 9ccdb2d
 - Document last modified: 2025-08-22T14:19:45.000Z
 
Metadata
Metadata
Assignees
Labels
Content:CSSCascading Style Sheets docsCascading Style Sheets docshelp wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!