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
Styles like padding and margin which need the use of a shorthand to be expanded into their left, right, top, bottom equivalents error when you try to use them in a makeStyles call. However, if they are used inside of a selector that's not part of CSS.Pseudos then they do not error out and the styles are ultimately ignored.
We should fix the types so that these styles always error out to indicate the user that they need to change them to shorthands.
Example:
constuseStyles=makeStyles({base: {':hover': {// will error outpadding: "1px"},[`& .${testClassName}`]': {// will not error outpadding: "1px"}}});
The text was updated successfully, but these errors were encountered:
Unfortunately we have not found a way how to avoid this in Typescript.
Currently Griffel already warns on the padding in development mode and never adds it to DOM (see #47).
We plan to add Lint rules to improve the build time check in #76.
We cannot do anything against it unfortunately. But the ESLint plugin with a matching rule was implemented in #99, you can find an example how it could be consumed in docs or in the real PR (microsoft/fluentui#22961).
Styles like
padding
andmargin
which need the use of a shorthand to be expanded into theirleft
,right
,top
,bottom
equivalents error when you try to use them in amakeStyles
call. However, if they are used inside of a selector that's not part ofCSS.Pseudos
then they do not error out and the styles are ultimately ignored.We should fix the types so that these styles always error out to indicate the user that they need to change them to shorthands.
Example:
The text was updated successfully, but these errors were encountered: