Skip to content

Commit c8b9acf

Browse files
docs(styling): fix grammar + typos (#10657)
Co-authored-by: Brooks Lybrand <[email protected]>
1 parent e9ed28e commit c8b9acf

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

docs/styling/bundling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: CSS Bundling
66

77
<docs-warning>This documentation is only relevant when using the [Classic Remix Compiler][classic-remix-compiler]. If you're using [Remix Vite][remix-vite], you should refer to [Vite's CSS documentation][vite-css] instead.</docs-warning>
88

9-
Some CSS features in Remix bundle styles into a single file that you load manually into the application including:
9+
Some CSS features in Remix bundle styles into a single file that you load manually into the application, including:
1010

1111
- [CSS Side Effect Imports][css-side-effect-imports]
1212
- [CSS Modules][css-modules]

docs/styling/css-in-js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ title: CSS in JS
44

55
# CSS in JS libraries
66

7-
You can use CSS-in-JS libraries like Styled Components and Emotion. Some of them require a "double render" in order to extract the styles from the component tree during the server render.
7+
You can use CSS-in-JS libraries like Styled Components and Emotion. Some of them require a "double render" to extract the styles from the component tree during the server render.
88

99
Since each library is integrated differently, check out our [examples repo][examples] to see how to use some of the most popular CSS-in-JS libraries. If you've got a library working well that hasn't been covered, please [contribute an example][examples]!
1010

1111
<docs-warning>
12-
Most CSS-in-JS approaches aren't recommended for use in Remix because they require your app to render completely before you know what the styles are. This is a performance issue and prevents streaming features like defer.
12+
Most CSS-in-JS approaches aren't recommended for use in Remix because they require your app to render completely before you know what the styles are. This is a performance issue and prevents streaming features like `defer`.
1313
</docs-warning>
1414

1515
[examples]: https://github.com/remix-run/examples

docs/styling/css.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ title: Regular CSS
66

77
Remix helps you scale an app with regular CSS with nested routes and [`links`][links].
88

9-
CSS Maintenance issues can creep into a web app for a few reasons. It can get difficult to know:
9+
CSS Maintenance issues can creep into a web app for a few reasons. It can get challenging to know:
1010

1111
- how and when to load CSS, so it was usually all loaded on every page
1212
- if the class names and selectors you were using were accidentally styling other UI in the app
1313
- if some rules weren't even used anymore as the CSS source code grew over time
1414

15-
Remix alleviates these issues with route-based stylesheets. Nested routes can each add their own stylesheets to the page and Remix will automatically prefetch, load, and unload them with the route. When the scope of concern is limited to just the active routes, the risks of these problems are reduced significantly. The only chances for conflicts are with the parent routes' styles (and even then, you will likely see the conflict since the parent route is also rendering).
15+
Remix alleviates these issues with route-based stylesheets. Nested routes can each add their own stylesheets to the page, and Remix will automatically prefetch, load, and unload them with the route. When the scope of concern is limited to just the active routes, the risks of these problems are reduced significantly. The only chances for conflicts are with the parent routes' styles (and even then, you will likely see the conflict since the parent route is also rendering).
1616

1717
<docs-warning>If you're using the [Classic Remix Compiler][classic-remix-compiler] rather than [Remix Vite][remix-vite], you should remove `?url` from the end of your CSS import paths.</docs-warning>
1818

@@ -62,11 +62,11 @@ It's subtle, but this little feature removes a lot of the difficulty when stylin
6262

6363
### Shared Component Styles
6464

65-
Websites large and small usually have a set of shared components used throughout the rest of the app: buttons, form elements, layouts, etc. When using plain style sheets in Remix there are two approaches we recommend.
65+
Websites large and small usually have a set of shared components used throughout the rest of the app: buttons, form elements, layouts, etc. When using plain style sheets in Remix, there are two approaches we recommend.
6666

6767
#### Shared stylesheet
6868

69-
The first approach is very simple. Put them all in a `shared.css` file included in `app/root.tsx`. That makes it easy for the components themselves to share CSS code (and your editor to provide intellisense for things like [custom properties][custom-properties]), and each component already needs a unique module name in JavaScript anyway, so you can scope the styles to a unique class name or data attribute:
69+
The first approach is basic. Put them all in a `shared.css` file included in `app/root.tsx`. That makes it easy for the components themselves to share CSS code (and your editor to provide intellisense for things like [custom properties][custom-properties]). Each component already needs a unique module name in JavaScript anyway, so you can scope the styles to a unique class name or data attribute:
7070

7171
```css filename=app/styles/shared.css
7272
/* scope with class names */
@@ -101,7 +101,7 @@ This also makes it easy for routes to adjust the styles of a component without n
101101

102102
#### Surfacing Styles
103103

104-
A second approach is to write individual css files per component and then "surface" the styles up to the routes that use them.
104+
A second approach is to write individual CSS files per component and then "surface" the styles up to the routes that use them.
105105

106106
Perhaps you have a `<Button>` in `app/components/button/index.tsx` with styles at `app/components/button/styles.css` as well as a `<PrimaryButton>` that extends it.
107107

@@ -252,11 +252,11 @@ export const links: LinksFunction = () => {
252252
// ...
253253
```
254254

255-
While that's a bit of boilerplate it enables a lot:
255+
While that's a bit of boilerplate, it enables a lot:
256256

257257
- You control your network tab, and CSS dependencies are clear in the code
258258
- Co-located styles with your components
259-
- The only CSS ever loaded is the CSS that's used on the current page
259+
- The only CSS ever loaded is the CSS used on the current page
260260
- When your components aren't used by a route, their CSS is unloaded from the page
261261
- Remix will prefetch the CSS for the next page with [`<Link prefetch>`][link]
262262
- When one component's styles change, browser and CDN caches for the other components won't break because they all have their own URLs.
@@ -297,7 +297,7 @@ export const CopyToClipboard = React.forwardRef(
297297
CopyToClipboard.displayName = "CopyToClipboard";
298298
```
299299

300-
Not only will this make the asset high priority in the network tab, but Remix will turn that `preload` into a `prefetch` when you link to the page with [`<Link prefetch>`][link], so the SVG background is prefetched, in parallel, with the next route's data, modules, stylesheets, and any other preloads.
300+
Not only will this make the asset a high priority in the network tab, but Remix will turn that `preload` into a `prefetch` when you link to the page with [`<Link prefetch>`][link], so the SVG background is prefetched, in parallel, with the next route's data, modules, stylesheets, and any other preloads.
301301

302302
### Link Media Queries
303303

docs/styling/postcss.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ You can use CSS preprocessors like LESS and SASS. Doing so requires running an a
4646
4747
Once converted to CSS by the preprocessor, the generated CSS files can be imported into your components via the [Route Module `links` export][route-module-links] function, or included via [side effect imports][css-side-effect-imports] when using [CSS bundling][css-bundling], just like any other CSS file in Remix.
4848
49-
To ease development with CSS preprocessors you can add npm scripts to your `package.json` that generate CSS files from your SASS or LESS files. These scripts can be run in parallel alongside any other npm scripts that you run for developing a Remix application.
49+
To ease development with CSS preprocessors, you can add npm scripts to your `package.json` that generate CSS files from your SASS or LESS files. These scripts can be run in parallel alongside any other npm scripts that you run for developing a Remix application.
5050
5151
An example using SASS.
5252
53-
1. First you'll need to install the tool your preprocess uses to generate CSS files.
53+
1. First, you'll need to install the tool your preprocessing uses to generate CSS files.
5454
5555
```shellscript nonumber
5656
npm add -D sass
5757
```
5858
59-
2. Add an npm script to your `package.json`'s `scripts` section that uses the installed tool to generate CSS files.
59+
2. Add an `npm` script to your `package.json`'s `scripts` section that uses the installed tool to generate CSS files.
6060
6161
```jsonc filename=package.json
6262
{
@@ -79,7 +79,7 @@ An example using SASS.
7979
npm run sass
8080
```
8181
82-
This will start the `sass` process. Any new SASS files, or changes to existing SASS files, will be detected by the running process.
82+
This will start the `sass` process. The running process will detect any new SASS files or changes to existing SASS files.
8383
8484
You might want to use something like `concurrently` to avoid needing two terminal tabs to generate your CSS files and also run `remix dev`.
8585

docs/styling/tailwind.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Tailwind
44

55
# Tailwind
66

7-
<docs-warning>This documentation is only relevant when using the [Classic Remix Compiler][classic-remix-compiler]. If you're using [Remix Vite][remix-vite], Tailwind can be integrated using [Vite's built-in PostCSS support][vite-postcss].</docs-warning>
7+
<docs-warning>This documentation is only relevant when using the [Classic Remix Compiler][classic-remix-compiler]. If you're using [Remix Vite][remix-vite], Tailwind CSS can be integrated using [Vite's built-in PostCSS support][vite-postcss].</docs-warning>
88

99
Perhaps the most popular way to style a Remix application in the community is to use [Tailwind CSS][tailwind].
1010

@@ -74,7 +74,7 @@ If you're using VS Code, it's recommended you install the [Tailwind IntelliSense
7474

7575
It's recommended that you avoid Tailwind's `@import` syntax (e.g. `@import 'tailwindcss/base'`) in favor of Tailwind directives (e.g. `@tailwind base`).
7676

77-
Tailwind replaces its import statements with inlined CSS but this can result in the interleaving of styles and import statements. This clashes with the restriction that all import statements must be at the start of the file.
77+
Tailwind replaces its import statements with inlined CSS, but this can result in the interleaving of styles and import statements. This clashes with the restriction that all import statements must be at the start of the file.
7878

7979
Alternatively, you can use [PostCSS][built-in-post-css-support] with the [postcss-import] plugin to process imports before passing them to esbuild.
8080

0 commit comments

Comments
 (0)