flinker-dom 1.1.14 → 1.1.16
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
|
@@ -71,7 +71,7 @@ const abbreviations = {
|
|
|
71
71
|
'user-select': 'U',
|
|
72
72
|
'z-index': 'Z'
|
|
73
73
|
};
|
|
74
|
-
const pseudoClasses = ['none', ':hover', ':focus', '
|
|
74
|
+
const pseudoClasses = ['none', ':hover', ':focus', '::placeholder', '::before'];
|
|
75
75
|
export class StyleSheetProcessor {
|
|
76
76
|
constructor(styleSheet) {
|
|
77
77
|
this.hash = new Map();
|
|
@@ -108,6 +108,7 @@ export class StyleSheetProcessor {
|
|
|
108
108
|
this.list.forEach(c => { c.clear(); });
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
StyleSheetProcessor.echo = false;
|
|
111
112
|
export class PseudoClass {
|
|
112
113
|
constructor(type, styleSheet) {
|
|
113
114
|
this.type = type;
|
|
@@ -119,6 +120,8 @@ export class PseudoClass {
|
|
|
119
120
|
if (this.style) {
|
|
120
121
|
const rule = tag + '.' + className + (this.type === 'none' ? '' : this.type) + '{' + this.style + '}';
|
|
121
122
|
this.styleSheet.insertRule(rule);
|
|
123
|
+
if (StyleSheetProcessor.echo)
|
|
124
|
+
console.log(`StyleSheetProcessor: new rule: ${rule}`);
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
127
|
setValue(key, value, priority, appendToClassName = true) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type RulePriority } from './core';
|
|
2
|
-
declare const pseudoClasses: readonly ["none", ":hover", ":focus", "
|
|
2
|
+
declare const pseudoClasses: readonly ["none", ":hover", ":focus", "::placeholder", "::before"];
|
|
3
3
|
export type PseudoClassType = typeof pseudoClasses[number];
|
|
4
4
|
export declare class StyleSheetProcessor {
|
|
5
5
|
private readonly hash;
|
|
6
6
|
private readonly list;
|
|
7
|
+
static echo: boolean;
|
|
7
8
|
constructor(styleSheet: CSSStyleSheet);
|
|
8
9
|
setValue(to: PseudoClassType, key: string, value: string, priority: RulePriority, appendToClassName?: boolean): void;
|
|
9
10
|
valuesToHashSum(): string;
|