Re: [csswg-drafts] [css-pseudo-4] Support for highlight pseudos declarations inside @container media queries (#9280)

This case fails in chromium still, with the ::highlight pseudo only declared inside the @container media query.

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Highlight API Test: </title>
<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/">
<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling">
<link rel="match" href="custom-highlight-container-metrics-003-ref.html">
<meta name="assert" value="lengths depending on containers take the correct values and a highlight defined inside the container renders only within the container">
<head>
  <style>
    .wrapper {
      container: wrapper / size;
      width: 200px;
      height: 100px;
    }
    @container wrapper (width > 100px) {
      ::highlight(highlight1) {
        text-underline-offset: 2cqw;
        text-decoration-line: underline;
        text-decoration-color: green;
        text-decoration-thickness: 4cqh;
      }
    }
  </style>
</head>
<body>
  <div class="wrapper">
    <div id="h1">With container size</div>
  </div>
  <div id="h2">Should be no highlight</div>
  <script>
    let r1 = new Range();
    r1.setStart(h1, 0);
    r1.setEnd(h1, 1);
    CSS.highlights.set("highlight1", new Highlight(r1));
    let r2 = new Range();
    r2.setStart(h2, 0);
    r2.setEnd(h2, 1);
    CSS.highlights.set("highlight1", new Highlight(r2));
  </script>
</body>

-- 
GitHub Notification of comment by schenney-chromium
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9280#issuecomment-1864585862 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 December 2023 14:38:39 UTC