We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfb4646 commit 71350f3Copy full SHA for 71350f3
1 file changed
sql/2025/css/color_mix.sql
@@ -0,0 +1,30 @@
1
+CREATE TEMPORARY FUNCTION countColorMixDeclarations(css JSON)
2
+RETURNS NUMERIC
3
+LANGUAGE js
4
+OPTIONS (library = "gs://httparchive/lib/css-utils.js")
5
+AS r'''
6
+try {
7
+ return countDeclarations(css.stylesheet.rules, {values: /color-mix\(.*\)/});
8
+} catch (e) {
9
+ return null;
10
+}
11
+''';
12
+
13
+SELECT
14
+ client,
15
+ COUNT(DISTINCT IF(declarations > 0, page, NULL)) AS pages,
16
+ COUNT(DISTINCT page) AS total,
17
+ COUNT(DISTINCT IF(declarations > 0, page, NULL)) / COUNT(DISTINCT page) AS pct_pages
18
+FROM (
19
+ SELECT
20
21
+ page,
22
+ countColorMixDeclarations(css) AS declarations
23
+ FROM
24
+ `httparchive.crawl.parsed_css`
25
+ WHERE
26
+ date = '2025-07-01' AND
27
+ rank <= 1000000
28
+)
29
+GROUP BY
30
+ client
0 commit comments