Skip to content

Commit 5c3e0ad

Browse files
Update README.md
1 parent aed83d4 commit 5c3e0ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,11 @@ The CSS language and CSS Modules approach have some limitations especially if yo
937937
- **Styles cannot be co-located with components**
938938
This can be frustrating when authoring many small components, but it's not a deal breaker. For large components/containers/pages/screens this isn't an actual issue, because you probably prefer to extract the styles in a separate file.
939939

940+
- **Styling pseudos and media queries requires duplication**
941+
Another frustrating fact at some point is the need to duplicate your class name when defining __pseudo classes and elements__, or __media queries__. You can overcome these limitations using a CSS preprocessor like __SASS, LESS or Stylus__, which all support the `&` parent selector, enabling __contextual styling__.
942+
940943
- **Styles usage is disconnected from their definition**
941-
You get no IntelliSense with CSS Modules, of what styles/classes are defined in the `.module.css` files, making **copy-paste** a required tool, lowering the DX. It also makes refactoring very cumbersome, because of the lack of safety.
944+
You get no IntelliSense with CSS Modules, of what styles/classes are defined in the `.module.css` files, making **copy-paste** a required tool, lowering the DX. It also makes __refactoring very cumbersome__, because of the lack of safety.
942945

943946
- **Styles cannot access design tokens**
944947
Any design tokens, defined in JS/TS cannot be directly used in CSS. There are 2 workarouns for this issue, neither of them being elegant:

0 commit comments

Comments
 (0)