@@ -40,12 +40,11 @@ import {
4040 FLAG_IMPORTANT ,
4141 FLAG_HAS_ERROR ,
4242 FLAG_HAS_BLOCK ,
43- FLAG_VENDOR_PREFIXED ,
4443 FLAG_HAS_DECLARATIONS ,
4544 FLAG_HAS_PARENS ,
4645} from './arena'
4746
48- import { CHAR_MINUS_HYPHEN , CHAR_PLUS , is_whitespace , str_starts_with } from './string-utils'
47+ import { CHAR_MINUS_HYPHEN , CHAR_PLUS , is_whitespace , is_vendor_prefixed , str_starts_with } from './string-utils'
4948import { parse_dimension } from './parse-utils'
5049
5150// Type name lookup table - maps numeric type to CSSTree-compatible strings
@@ -312,9 +311,28 @@ export class CSSNode {
312311 return this . arena . has_flag ( this . index , FLAG_IMPORTANT )
313312 }
314313
315- // Check if this has a vendor prefix (flag-based for performance )
314+ // Check if this has a vendor prefix (computed on-demand )
316315 get is_vendor_prefixed ( ) : boolean {
317- return this . arena . has_flag ( this . index , FLAG_VENDOR_PREFIXED )
316+ switch ( this . type ) {
317+ case DECLARATION :
318+ // Check property name (e.g., -webkit-transform)
319+ return is_vendor_prefixed ( this . name )
320+ case PSEUDO_CLASS_SELECTOR :
321+ case PSEUDO_ELEMENT_SELECTOR :
322+ // Check pseudo-class/element name without colons (e.g., -webkit-autofill, -webkit-scrollbar)
323+ return is_vendor_prefixed ( this . name )
324+ case AT_RULE :
325+ // Check at-rule name (e.g., -webkit-keyframes from @-webkit-keyframes)
326+ return is_vendor_prefixed ( this . name )
327+ case FUNCTION :
328+ // Check function name (e.g., -webkit-gradient from -webkit-gradient())
329+ return is_vendor_prefixed ( this . name )
330+ case IDENTIFIER :
331+ // Check identifier value (e.g., -webkit-sticky)
332+ return is_vendor_prefixed ( this . text )
333+ default :
334+ return false
335+ }
318336 }
319337
320338 // Check if this node has an error
0 commit comments