the benefit with griffel is we don't get duplicate CSS rules
from griffel and tailwind, and LTR/RTL works (which is one of the
main reasons we use griffel in the first place).
There are 3 places to define styles in this architecture:
To use the style engine in a component, either invoke the project-level hook useStyleEngine(),
or the component-level hook useStyles(). The style string passed to m is type-checked by TypeScript
to be a space-separated list of style classes.
Tailwind-like style engine, but uses
griffelthe benefit with griffel is we don't get duplicate CSS rules from griffel and tailwind, and LTR/RTL works (which is one of the main reasons we use griffel in the first place).
There are 3 places to define styles in this architecture:
galefunction. For example: These will be merged with the built-in styles (and could override them)useStyleEngineexported from above. This is similar tomakeStylesfromgriffel.To use the style engine in a component, either invoke the project-level hook
useStyleEngine(), or the component-level hookuseStyles(). The style string passed tomis type-checked by TypeScript to be a space-separated list of style classes.