rusackas commented on issue #15264:
URL: https://github.com/apache/superset/issues/15264#issuecomment-878402092


   Thoughts on some "rules" to make this more of a style guide. Please feel 
free to suggest additional ones or contest anything controversial here.
   
   **DO** use `styled` when you want to include additional (nested) class 
selectors in your styles
   **DO** use `styled` components when you intend to export a styled component 
for re-use elsewhere 
   **DO** use `css` when you want to amend/merge sets of styles compositionally
   **DO** use `css` when you're making a small, or single-use set of styles for 
a component
   **DO** move your style definitions for the `css` prop to an external 
variable when they get long
   **DO** prefer tagged template literals (`css={css...`) over style objects 
wherever possible for maximum style portability/consistency (note: typescript 
support may be diminished, but IDE plugins like 
[this](https://marketplace.visualstudio.com/items?itemName=jpoissonnier.vscode-styled-components)
 make life easy)
   
   **DO NOT** use `styled` for small, single-use style tweaks that would be 
easier to read/review if they were inline
   **DO NOT** export impartial AntD components (make sure all their compound 
components are exported)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to