3 ms·
I vote for #4 - use SCSS syntax with bounded forward-lookahead. > CSS to date requires only a small, known amount of lookahead in its parsing, which allows for
by claar 4y ago
I vote for #4 - use SCSS syntax with bounded forward-lookahead.
> CSS to date requires only a small, known amount of lookahead in its parsing, which allows for more efficient parsing algorithms, so unbounded lookahead is generally considered unacceptable among browser implementations of CSS.
Then choose a bound! Make it big enough that it'll cover 99.9% of use cases, ignore any CSS rules beyond the bound with a console warning, and go on with life...
This seems so obvious that I feel I must be overlooking something. Perhaps the bound would be so big, that when parsing multiple stylesheets in parallel the memory use would be unacceptable?