@percy/dom 1.32.7 → 1.32.8-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +8 -9
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -408,8 +408,7 @@
|
|
|
408
408
|
// Only treat as mismatch when the live sheet has MORE rules than the
|
|
409
409
|
// clone — that signals rules were added via CSSOM (insertRule/adopted)
|
|
410
410
|
// and must be re-serialized. When lenA <= lenB, the clone already
|
|
411
|
-
// contains all of the live rules
|
|
412
|
-
// <style> textContent handling); trust the clone's source text so that
|
|
411
|
+
// contains all of the live rules; trust the clone's source text so that
|
|
413
412
|
// CSS shorthand semantics (e.g. `all: initial; border-radius: var(...)`)
|
|
414
413
|
// survive — `cssRule.cssText` expansion appends logical longhands like
|
|
415
414
|
// `border-end-end-radius: initial` AFTER the shorthand, which silently
|
|
@@ -1415,21 +1414,21 @@
|
|
|
1415
1414
|
// Handle <style> tag specifically for media queries
|
|
1416
1415
|
if (node.nodeName === 'STYLE' && !enableJavaScript) {
|
|
1417
1416
|
var _node$textContent;
|
|
1418
|
-
let
|
|
1419
|
-
if (!
|
|
1417
|
+
let ownText = ((_node$textContent = node.textContent) === null || _node$textContent === void 0 ? void 0 : _node$textContent.trim()) || '';
|
|
1418
|
+
if (!ownText && node.sheet) {
|
|
1420
1419
|
try {
|
|
1421
1420
|
const cssRules = node.sheet.cssRules;
|
|
1422
1421
|
if (cssRules && cssRules.length > 0) {
|
|
1423
|
-
cssText = Array.from(cssRules).map(rule => rule.cssText).join('\n');
|
|
1422
|
+
let cssText = Array.from(cssRules).map(rule => rule.cssText).join('\n');
|
|
1423
|
+
if (cssText) {
|
|
1424
|
+
clone.textContent = cssText;
|
|
1425
|
+
clone.setAttribute('data-percy-cssom-serialized', 'true');
|
|
1426
|
+
}
|
|
1424
1427
|
}
|
|
1425
1428
|
} catch (_) {
|
|
1426
1429
|
// ignore errors
|
|
1427
1430
|
}
|
|
1428
1431
|
}
|
|
1429
|
-
if (cssText) {
|
|
1430
|
-
clone.textContent = cssText;
|
|
1431
|
-
clone.setAttribute('data-percy-cssom-serialized', 'true');
|
|
1432
|
-
}
|
|
1433
1432
|
}
|
|
1434
1433
|
|
|
1435
1434
|
// We apply any element transformations here to avoid another treeWalk
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/dom",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.8-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "beta"
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/bundle.js",
|
|
15
15
|
"browser": "dist/bundle.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"interactor.js": "^2.0.0-beta.10"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "1042bcd8b2089134f8ab52846ebc0eef5954079c"
|
|
39
39
|
}
|