@master/css 2.0.0-rc.51 → 2.0.0-rc.52
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/layer.cjs +2 -2
- package/dist/layer.mjs +2 -2
- package/package.json +1 -1
package/dist/layer.cjs
CHANGED
|
@@ -20,7 +20,7 @@ class Layer {
|
|
|
20
20
|
if (!this.css.rules.includes(this)) {
|
|
21
21
|
this.css.rules.push(this);
|
|
22
22
|
const nativeSheet = this.css.style?.sheet;
|
|
23
|
-
if (nativeSheet && !this.native) {
|
|
23
|
+
if (nativeSheet && !this.native?.parentStyleSheet) {
|
|
24
24
|
const insertedIndex = nativeSheet.insertRule(this.text, nativeSheet.cssRules.length);
|
|
25
25
|
this.native = nativeSheet.cssRules.item(insertedIndex);
|
|
26
26
|
}
|
|
@@ -70,7 +70,7 @@ class Layer {
|
|
|
70
70
|
const indexOfLayer = this.css.rules.indexOf(this);
|
|
71
71
|
this.css.rules.splice(indexOfLayer, 1);
|
|
72
72
|
const nativeSheet = this.css.style?.sheet;
|
|
73
|
-
if (nativeSheet && this.native) {
|
|
73
|
+
if (nativeSheet && this.native?.parentStyleSheet) {
|
|
74
74
|
const foundIndex = findNativeCssRuleIndex(nativeSheet.cssRules, this.native);
|
|
75
75
|
if (foundIndex !== -1) {
|
|
76
76
|
nativeSheet.deleteRule(foundIndex);
|
package/dist/layer.mjs
CHANGED
|
@@ -18,7 +18,7 @@ class Layer {
|
|
|
18
18
|
if (!this.css.rules.includes(this)) {
|
|
19
19
|
this.css.rules.push(this);
|
|
20
20
|
const nativeSheet = this.css.style?.sheet;
|
|
21
|
-
if (nativeSheet && !this.native) {
|
|
21
|
+
if (nativeSheet && !this.native?.parentStyleSheet) {
|
|
22
22
|
const insertedIndex = nativeSheet.insertRule(this.text, nativeSheet.cssRules.length);
|
|
23
23
|
this.native = nativeSheet.cssRules.item(insertedIndex);
|
|
24
24
|
}
|
|
@@ -68,7 +68,7 @@ class Layer {
|
|
|
68
68
|
const indexOfLayer = this.css.rules.indexOf(this);
|
|
69
69
|
this.css.rules.splice(indexOfLayer, 1);
|
|
70
70
|
const nativeSheet = this.css.style?.sheet;
|
|
71
|
-
if (nativeSheet && this.native) {
|
|
71
|
+
if (nativeSheet && this.native?.parentStyleSheet) {
|
|
72
72
|
const foundIndex = findNativeCSSRuleIndex(nativeSheet.cssRules, this.native);
|
|
73
73
|
if (foundIndex !== -1) {
|
|
74
74
|
nativeSheet.deleteRule(foundIndex);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"vitest","type-check":"tsc --noEmit","lint":"eslint"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/core"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/colors":"^2.1.0","@master/normal.css":"^3.1.0","@techor/extend":"^3.1.7","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.
|
|
1
|
+
{"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"vitest","type-check":"tsc --noEmit","lint":"eslint"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/core"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/colors":"^2.1.0","@master/normal.css":"^3.1.0","@techor/extend":"^3.1.7","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.52"},"version":"2.0.0-rc.52"}
|