flinker-dom 1.0.11 → 1.0.12
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/esm/processor.js
CHANGED
|
@@ -83,7 +83,7 @@ export class StyleSheetProcessor {
|
|
|
83
83
|
this.list.push(pc);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
const pc = new PseudoClass(t, styleSheet);
|
|
86
|
+
const pc = new PseudoClass(t, styleSheet, t === 'placeholder' ? '::' : ':');
|
|
87
87
|
this.hash.set(t, pc);
|
|
88
88
|
this.list.push(pc);
|
|
89
89
|
}
|
|
@@ -109,15 +109,16 @@ export class StyleSheetProcessor {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
export class PseudoClass {
|
|
112
|
-
constructor(type, styleSheet) {
|
|
112
|
+
constructor(type, styleSheet, divider = ':') {
|
|
113
113
|
this.type = type;
|
|
114
114
|
this.styleSheet = styleSheet;
|
|
115
115
|
this.style = '';
|
|
116
116
|
this.hashSum = '';
|
|
117
|
+
this.divider = divider;
|
|
117
118
|
}
|
|
118
119
|
insertRule(className, tag) {
|
|
119
120
|
if (this.style) {
|
|
120
|
-
const rule = tag + '.' + className + (this.type === 'none' ? '' :
|
|
121
|
+
const rule = tag + '.' + className + (this.type === 'none' ? '' : this.divider + this.type) + '{' + this.style + '}';
|
|
121
122
|
this.styleSheet.insertRule(rule);
|
|
122
123
|
}
|
|
123
124
|
}
|
|
@@ -14,7 +14,8 @@ export declare class PseudoClass {
|
|
|
14
14
|
readonly styleSheet: CSSStyleSheet;
|
|
15
15
|
style: string;
|
|
16
16
|
hashSum: string;
|
|
17
|
-
|
|
17
|
+
readonly divider: string;
|
|
18
|
+
constructor(type: PseudoClassType, styleSheet: CSSStyleSheet, divider?: string);
|
|
18
19
|
insertRule(className: string, tag: string): void;
|
|
19
20
|
setValue(key: string, value: string, priority: RulePriority, appendToClassName?: boolean): void;
|
|
20
21
|
isEmpty(): boolean;
|