@@ -4,7 +4,6 @@ import registerGlobal from './register-global'
4
4
import { HydrateResult } from './types'
5
5
import RuntimeLayer from './layer'
6
6
import RuntimeSyntaxLayer , { RuntimeSyntaxLayerInstance } from './syntax-layer'
7
- import RuntimeSyntaxRule from './syntax-rule'
8
7
9
8
export default class CSSRuntime extends MasterCSS {
10
9
static instances = new WeakMap < Document | ShadowRoot , CSSRuntime > ( )
@@ -18,9 +17,7 @@ export default class CSSRuntime extends MasterCSS {
18
17
readonly presetLayer = new RuntimeSyntaxLayer ( 'preset' , this )
19
18
readonly componentsLayer = new RuntimeSyntaxLayer ( 'components' , this )
20
19
readonly generalLayer = new RuntimeSyntaxLayer ( 'general' , this )
21
- readonly SyntaxRule = RuntimeSyntaxRule
22
20
readonly classCounts = new Map < string , number > ( )
23
- readonly Native = CSS
24
21
25
22
constructor (
26
23
public root : Document | ShadowRoot = document ,
@@ -310,7 +307,6 @@ export default class CSSRuntime extends MasterCSS {
310
307
layer . insertAnimations ( createdRule )
311
308
result . allSyntaxRules . push ( createdRule )
312
309
createdRule . nodes . forEach ( ( node ) => {
313
- if ( node . unsupported ) return
314
310
try {
315
311
const checkRuleIndex = checkSheet . insertRule ( node . text )
316
312
const checkNodeNativeRule = checkSheet . cssRules . item ( checkRuleIndex )
@@ -323,8 +319,12 @@ export default class CSSRuntime extends MasterCSS {
323
319
return
324
320
}
325
321
}
326
- } catch ( error ) { }
327
- console . error ( `Cannot retrieve CSS rule for \`${ node . text } \`. (${ layer . name } ) (https://rc.css.master.co/messages/hydration-errors)` )
322
+ console . error ( `Cannot retrieve CSS rule for \`${ node . text } \`. (${ layer . name } ) (https://rc.css.master.co/messages/hydration-errors)` )
323
+ } catch ( error ) {
324
+ if ( process . env . NODE_ENV === 'development' ) {
325
+ console . debug ( `Cannot insert CSS rule for \`${ node . text } \`. (${ layer . name } ) (https://rc.css.master.co/messages/hydration-errors)` )
326
+ }
327
+ }
328
328
} )
329
329
}
330
330
} else {
0 commit comments