{
  "slug": "playwright-tohavecss-reads-pseudo-element-styles-ae03dec5d9ec",
  "title": "Playwright toHaveCSS() reads pseudo-element styles",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-11T19:08:18.000Z",
  "announced_at": "2026-05-11T19:08:18.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When asserting a locator’s computed CSS for a `::before` or `::after` pseudo-element, pass `pseudo: 'before'` or `pseudo: 'after'` in the `toHaveCSS()` options.",
    "examples": [
      "await expect(locator).toHaveCSS('content', '\"New\"', { pseudo: 'before' });",
      "await expect(locator).toHaveCSS('content', '\"New\"', { pseudo: 'after' });"
    ],
    "gotchas": [
      "Version: v1.60.0",
      "name (required): CSS property name.",
      "value (required): Expected CSS property value; may be a string or RegExp.",
      "options.pseudo: Selects the pseudo-element to read computed styles from: `before` or `after`.",
      "The release names `::before` and `::after` as supported pseudo-elements."
    ]
  },
  "why_it_matters": "Assert the computed CSS style of a locator's `::before` or `::after` pseudo-element.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.60.0",
    "https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-css"
  ],
  "rank": 0.90023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-15228fe3d33f40e5-8:gate",
    "evidence_hash": "8d2217b180ed48f8295026249b4e63507609b51ecea3842ff24b521ee9c9c11e"
  },
  "review": {
    "draft_hash": "b878edb26da4ad50c051aa551c0c34d21e4a94d631b44d3559f3a4d5aa8484fe",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.90 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
