{
 "compat_features": [
  "css.types.sibling-count",
  "css.types.sibling-index"
 ],
 "description": "The sibling-count() and sibling-index() CSS functions return integers that are useful to style elements based on their positions among siblings or on the number of siblings, for example as part of a calc() expression.",
 "description_html": "The <code>sibling-count()</code> and <code>sibling-index()</code> CSS functions return integers that are useful to style elements based on their positions among siblings or on the number of siblings, for example as part of a <code>calc()</code> expression.",
 "group": [
  "css"
 ],
 "kind": "feature",
 "name": "sibling-count() and sibling-index()",
 "spec": [
  "https://drafts.csswg.org/css-values-5/#tree-counting"
 ],
 "status": {
  "baseline": "low",
  "baseline_low_date": "2026-08-18",
  "by_compat_key": {
   "css.types.sibling-count": {
    "baseline": "low",
    "baseline_low_date": "2026-08-18",
    "support": {
     "chrome": "138",
     "chrome_android": "138",
     "edge": "138",
     "firefox": "154",
     "firefox_android": "154",
     "safari": "26.2",
     "safari_ios": "26.2"
    }
   },
   "css.types.sibling-index": {
    "baseline": "low",
    "baseline_low_date": "2026-08-18",
    "support": {
     "chrome": "138",
     "chrome_android": "138",
     "edge": "138",
     "firefox": "154",
     "firefox_android": "154",
     "safari": "26.2",
     "safari_ios": "26.2"
    }
   }
  },
  "support": {
   "chrome": "138",
   "chrome_android": "138",
   "edge": "138",
   "firefox": "154",
   "firefox_android": "154",
   "safari": "26.2",
   "safari_ios": "26.2"
  }
 },
 "id": "sibling-count",
 "groups": [
  "css"
 ],
 "specs": [
  {
   "url": "https://drafts.csswg.org/css-values-5/#tree-counting",
   "seriesComposition": "delta",
   "shortname": "css-values-5",
   "series": {
    "shortname": "css-values",
    "currentSpecification": "css-values-4",
    "title": "CSS Values and Units",
    "shortTitle": "CSS Values",
    "releaseUrl": "https://www.w3.org/TR/css-values/",
    "nightlyUrl": "https://drafts.csswg.org/css-values/"
   },
   "seriesVersion": "5",
   "shortTitle": "CSS Values 5",
   "seriesPrevious": "css-values-4",
   "organization": "W3C",
   "groups": [
    {
     "name": "Cascading Style Sheets (CSS) Working Group",
     "url": "https://www.w3.org/groups/wg/css/"
    }
   ],
   "release": {
    "url": "https://www.w3.org/TR/css-values-5/",
    "status": "Working Draft",
    "filename": "Overview.html"
   },
   "nightly": {
    "url": "https://drafts.csswg.org/css-values-5/",
    "status": "Editor's Draft",
    "alternateUrls": [
     "https://w3c.github.io/csswg-drafts/css-values-5/"
    ],
    "repository": "https://github.com/w3c/csswg-drafts",
    "sourcePath": "css-values-5/Overview.bs",
    "filename": "index.html"
   },
   "title": "CSS Values and Units Module Level 5",
   "source": "w3c",
   "categories": [
    "browser"
   ],
   "standing": "good",
   "tests": {
    "repository": "https://github.com/web-platform-tests/wpt",
    "testPaths": [
     "css/css-values"
    ]
   },
   "fragment": "tree-counting"
  }
 ],
 "mdnUrls": [
  {
   "slug": "Web/CSS/Reference/Values/sibling-count",
   "title": "`sibling-count()` CSS function",
   "anchor": null,
   "url": "https://developer.mozilla.org/docs/Web/CSS/Reference/Values/sibling-count"
  },
  {
   "slug": "Web/CSS/Reference/Values/sibling-index",
   "title": "`sibling-index()` CSS function",
   "anchor": null,
   "url": "https://developer.mozilla.org/docs/Web/CSS/Reference/Values/sibling-index"
  }
 ],
 "standardPositions": [
  {
   "vendor": "mozilla",
   "url": "https://github.com/mozilla/standards-positions/issues/1194",
   "position": "positive",
   "concerns": []
  },
  {
   "vendor": "apple",
   "url": "https://github.com/WebKit/standards-positions/issues/471",
   "position": "",
   "concerns": []
  }
 ],
 "hasNegativeStandardPosition": false,
 "stateOfSurveys": [
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/usage/#favorite_new_features",
   "question": "usage",
   "subQuestion": "favorite_new_features",
   "path": "dataAPI.surveys.state_of_css.css2026.usage.favorite_new_features.freeform.allEditions.1.buckets.15.entity"
  },
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/usage/#css_interoperability_features",
   "question": "usage",
   "subQuestion": "css_interoperability_features",
   "path": "dataAPI.surveys.state_of_css.css2026.usage.css_interoperability_features.freeform.allEditions.1.buckets.13.entity"
  },
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/features/#reading_list",
   "question": "reading_list",
   "subQuestion": "reading_list",
   "path": "dataAPI.surveys.state_of_css.css2026.reading_list.reading_list.combined.allEditions.0.buckets.9.entity"
  },
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/other_features/#other_features_pain_points_features",
   "question": "other_features",
   "subQuestion": "other_features_pain_points_features",
   "path": "dataAPI.surveys.state_of_css.css2026.other_features.other_features_pain_points_features.freeform.allEditions.0.buckets.3.entity"
  },
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/other_features/#other_features_pain_points",
   "question": "other_features",
   "subQuestion": "other_features_pain_points",
   "path": "dataAPI.surveys.state_of_css.css2026.other_features.other_features_pain_points.freeform.allEditions.0.buckets.6.entity"
  },
  {
   "name": "State of CSS 2026",
   "url": "https://2026.stateofcss.com/en-US/_all_features/#all_features",
   "question": "_all_features",
   "subQuestion": "all_features",
   "path": "dataAPI.surveys.state_of_css.css2026._all_features.all_features.44.entity"
  },
  {
   "name": "State of CSS 2025",
   "url": "https://2025.stateofcss.com/en-US/features/#reading_list",
   "question": "reading_list",
   "subQuestion": "reading_list",
   "path": "dataAPI.surveys.state_of_css.css2025.reading_list.reading_list.combined.allEditions.1.buckets.10.entity"
  },
  {
   "name": "State of CSS 2025",
   "url": "https://2025.stateofcss.com/en-US/features/#all_features",
   "question": "features",
   "subQuestion": "all_features",
   "path": "dataAPI.surveys.state_of_css.css2025.features.all_features.61.entity"
  }
 ],
 "chromeUseCounters": {},
 "interop": [],
 "wpt": {
  "url": "https://wpt.fyi/results?q=feature:sibling-count"
 },
 "developerSignals": null,
 "bugs": {
  "firefox": [
   "https://bugzil.la/1953973"
  ],
  "chrome": [
   "https://crbug.com/40282719"
  ]
 },
 "useCases": [
  {
   "description": "Animate in a row of cards with increasing `transition-delay`, so they appear one after another.",
   "url": "https://github.com/web-platform-dx/developer-signals/issues/361#issuecomment-3577825142"
  },
  {
   "description": "Reduce the size of all cards within a container, dynamically, as the number of cards within a container grows (indefinitely) - ensuring all cards fit within the container, with little-to-no overlaps. Whilst positioning each card \"randomly\" within the container using CSS alone.\n\nHere's what I came up with: https://codepen.io/TigerYT/pen/myVVWZP.\n\nhttps://github.com/user-attachments/assets/af142375-73d0-449f-ac5a-6eb07c855d5c\n\nThe issue? The only CSS-only solution to my problem (that I could come up with) used both `sibling-count()` and `sibling-index()`. Both of which, of course, are currently Chromium-only.",
   "url": "https://github.com/web-platform-dx/developer-signals/issues/361#issuecomment-3678304257"
  },
  {
   "description": "Many many things: staggering, visual adjustments, custom layouts, etc.",
   "url": "https://github.com/web-platform-dx/developer-signals/issues/361#issuecomment-4836111784"
  }
 ],
 "baselineLowDateAsObject": "2026-08-18T00:00:00.000Z",
 "baselineHighDateAsObject": null,
 "expectedBaselineHighDate": "2029-02-18"
}