Skip to content

Commit 22a50d4

Browse files
keveeMarcy Sutton
authored and
Marcy Sutton
committed
Edited for end-user stylesheets (#17679)
1 parent 4be781d commit 22a50d4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/docs/styled-components.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default () => (
114114

115115
### Enabling user stylesheets with a stable class name
116116

117-
Adding a persistent CSS `className` to your styled components can make it easier for users to take advantage of [User Stylesheets](https://www.viget.com/articles/inline-styles-user-style-sheets-and-accessibility/) for accessibility.
117+
Adding a persistent CSS `className` to your styled components can make it easier for end users of your website to take advantage of [user stylesheets](https://www.viget.com/articles/inline-styles-user-style-sheets-and-accessibility/) for accessibility.
118118

119119
Here's an example where the class name `container` is added to the DOM along with the Styled Components' dynamically-created class names:
120120

@@ -132,4 +132,11 @@ export default ({ children }) => (
132132
)
133133
```
134134

135-
A site user could then write their own CSS styles matching HTML elements with a class name of `.container`, and it wouldn't be affected if the CSS-in-JS output changed.
135+
An end user of your site could then [write their own CSS styles](https://mediatemple.net/blog/tips/bend-websites-css-will-stylish-stylebot/) matching HTML elements using a class name of `.container`. If your CSS-in-JS style changes, it will not affect the end user's stylesheet.
136+
137+
```css:title=user-stylesheet.css
138+
.container {
139+
margin: 5rem auto;
140+
font-size: 1.3rem;
141+
}
142+
```

0 commit comments

Comments
 (0)