Skip to content

Commit 9f7e264

Browse files
committed
Rename file to content_visibility
1 parent 7faf743 commit 9f7e264

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

dist/content-visibility.js renamed to dist/content_visibility.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33

44
function extractContentVisibilityFromAST(ast) {
55
const contentVisibilityValues = [];
6-
6+
77
if (!ast || !Array.isArray(ast)) {
88
return contentVisibilityValues;
99
}
10-
10+
1111
const rulesToProcess = [...ast];
12-
12+
1313
while (rulesToProcess.length > 0) {
1414
const rule = rulesToProcess.shift();
15-
15+
1616
if (rule.type === 'rule' && rule.declarations) {
1717
// Process regular CSS rules
1818
for (const declaration of rule.declarations) {
19-
if (declaration.type === 'declaration' &&
20-
declaration.property &&
19+
if (declaration.type === 'declaration' &&
20+
declaration.property &&
2121
declaration.property.toLowerCase() === 'content-visibility' &&
2222
declaration.value) {
2323
contentVisibilityValues.push(declaration.value.trim());
@@ -31,8 +31,8 @@ function extractContentVisibilityFromAST(ast) {
3131
for (const keyframe of rule.keyframes) {
3232
if (keyframe.declarations) {
3333
for (const declaration of keyframe.declarations) {
34-
if (declaration.type === 'declaration' &&
35-
declaration.property &&
34+
if (declaration.type === 'declaration' &&
35+
declaration.property &&
3636
declaration.property.toLowerCase() === 'content-visibility' &&
3737
declaration.value) {
3838
contentVisibilityValues.push(declaration.value.trim());
@@ -42,7 +42,7 @@ function extractContentVisibilityFromAST(ast) {
4242
}
4343
}
4444
}
45-
45+
4646
return contentVisibilityValues;
4747
}
4848

metric-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ Example response:
723723
[5, 12, 11]
724724
```
725725

726-
## [content-visibility.js](https://github.com/HTTPArchive/custom-metrics/blob/main/dist/content-visibility.js) metrics
726+
## [content_visibility.js](https://github.com/HTTPArchive/custom-metrics/blob/main/dist/content_visibility.js) metrics
727727

728728
### content_visibility
729729
Detects CSS rules using the `content-visibility` property for performance optimization analysis. This metric uses efficient regex-based detection with performance optimizations to find content-visibility declarations in stylesheets, style blocks, and inline styles. Returns information about CSS rules that have content-visibility set to values other than 'visible' (such as 'auto', 'hidden', or 'skip').

0 commit comments

Comments
 (0)