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
Copy file name to clipboardExpand all lines: content/docs/faq-styling.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,6 @@ category: FAQ
8
8
9
9
### How do I add CSS classes to components?
10
10
11
-
Import the CSS file in which the styles are scoped:
12
-
13
-
```jsx
14
-
importfrom'./path/to/Filename.css';
15
-
```
16
-
17
11
Pass a string as the `className` prop:
18
12
19
13
```jsx
@@ -46,7 +40,9 @@ CSS classes are generally more efficient than inline styles.
46
40
47
41
### What is CSS-in-JS?
48
42
49
-
CSS-in-JS refers to a pattern where CSS is written with Javascript, then extracted into a stylesheet.It is `not mandatory` to use CSS-in-JS.
43
+
CSS-in-JS refers to a pattern where CSS is written with Javascript, then extracted into a stylesheet.
44
+
45
+
It is _not recommended_ to use CSS-in-JS instead you may define your styles in a separate `*.css` file or inline (using the `style` attribute). If you still prefer using CSS-in-JS go checkout various libraries below:
50
46
51
47
[Comparison of CSS-in-JS Libraries](https://github.com/MicheleBertoli/css-in-js)
0 commit comments