@percy/dom 1.31.14-beta.4 → 1.31.15-alpha.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 +11 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -398,7 +398,17 @@
|
|
|
398
398
|
if (!sheetA.cssRules || !sheetB.cssRules) return false;
|
|
399
399
|
const lenA = sheetA.cssRules.length;
|
|
400
400
|
const lenB = sheetB.cssRules.length;
|
|
401
|
-
|
|
401
|
+
|
|
402
|
+
// Only treat as mismatch when the live sheet has MORE rules than the
|
|
403
|
+
// clone — that signals rules were added via CSSOM (insertRule/adopted)
|
|
404
|
+
// and must be re-serialized. When lenA <= lenB, the clone already
|
|
405
|
+
// contains all of the live rules (often duplicated by clone-dom's
|
|
406
|
+
// <style> textContent handling); trust the clone's source text so that
|
|
407
|
+
// CSS shorthand semantics (e.g. `all: initial; border-radius: var(...)`)
|
|
408
|
+
// survive — `cssRule.cssText` expansion appends logical longhands like
|
|
409
|
+
// `border-end-end-radius: initial` AFTER the shorthand, which silently
|
|
410
|
+
// overrides it and breaks the cascade.
|
|
411
|
+
if (lenA > lenB) return false;
|
|
402
412
|
for (let i = 0; i < lenA; i++) {
|
|
403
413
|
const ruleA = sheetA.cssRules[i] && sheetA.cssRules[i].cssText;
|
|
404
414
|
const ruleB = sheetB.cssRules[i] && sheetB.cssRules[i].cssText;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/dom",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.15-alpha.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": "alpha"
|
|
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": "726ab78fcd37479a0904996a88400a0b6626daac"
|
|
39
39
|
}
|