Questions about tokenization of CSS

Viewed 124

I read the specification related to CSS tokenization, and there is this sentence in the "4.3.4. Consume an ident-like token" section: "While the next two input code points are whitespace, consume the next input code point". What does it mean and why?

1 Answers

Tokens are used with the aim of creating a comprehensive design system. It saves a lot of duplicated code and avoids confusion between multiple teams. Basically different implementations and different libraries change the design and its implications. Design decisions have to be stored systematically and design tokens can be a suitable candidate for this purpose. Also, transforming data structure comes to the picture, since transforming data structure should be possible at every scale.

We may need to refactor and rearrange the tokens in our style dictionary. And treat indentations similar to white space, therefore here It needs to consume that as well.

This is an instance of design token:

"aliases": {
   "TOKEN_BRICK_SIZE_SM": {
   "value": "70px"
},
Related