You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now all plugins are implemented using functions so they are a
literal black box. In a perfect world, we can leverage the ASTs from the
`@utility` CSS plugins.
To work around this, we use the `getClassList` Intellisense API, and
pre-compute all utilities + modifiers (~19k total). This way we can
consider each of them a "static" utility.
Next, we index by property, value and list of utilities which is also
cached in a bigger shared DefaultMap. This eventually produces:
```json
{
'width': {
'16px': ['w-4', 'size-4'],
…
},
'height': {
'16px': ['h-4', 'size-4']
},
…
}
```
Later we can use these lookups to find the intersection between the used
utilities. This means that if you are using `w-4 h-4`, that we can get
`size-4` out of it.
0 commit comments