Skip to content

Commit aaf31fd

Browse files
docs: add note about online autoprefixing tools for non-build workflows (#10812)
* docs: add note about online autoprefixing tools for non-build workflows * docs(spfx): tighten wording in css-recommendations - replace `does not`/`cannot`/`will not`/`are not` with contractions - correct `artefact` to `artifact` - revert `ms.date` to original publication date; rendering engine shows last modified date dynamically from git history --------- Co-authored-by: Andrew Connell <me@andrewconnell.com>
1 parent a204ee0 commit aaf31fd

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/spfx/css-recommendations.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Recommendations for working with CSS in SharePoint Framework solutions
33
description: Use CSS to define how your SharePoint Framework customization should look and behave.
4-
ms.date: 03/23/2026
4+
ms.date: 08/28/2017
55
ms.localizationpriority: high
66
---
77
# Recommendations for working with CSS in SharePoint Framework solutions
@@ -175,9 +175,9 @@ export default class TodoList extends React.Component<ITodoListProps, void> {
175175

176176
For the CSS modules to work correctly, you have to meet the following conditions:
177177

178-
* Your Sass files must have the **.module.scss** extension. If you use the **.scss** extension without **.module**, you see a warning in the build process. The Sass file is transpiled to an intermediate CSS file, but the class names *will not be made unique*. In cases when you need to override third-party CSS styles, this might be intended.
178+
* Your Sass files must have the **.module.scss** extension. If you use the **.scss** extension without **.module**, you see a warning in the build process. The Sass file is transpiled to an intermediate CSS file, but the class names *won't be made unique*. In cases when you need to override third-party CSS styles, this might be intended.
179179

180-
* Your CSS class names must be valid JavaScript variable names. For example, they cannot contain hyphens: `todoList` is correct, but `todo-list` isn't.
180+
* Your CSS class names must be valid JavaScript variable names. For example, they can't contain hyphens: `todoList` is correct, but `todo-list` isn't.
181181

182182
* We recommend using camelCase naming for classes, but it's not enforced.
183183

@@ -235,7 +235,7 @@ In case a web part should use the new flex box model defined by the `display: fl
235235
}
236236
```
237237

238-
The Sass code of the SharePoint Framework artefact does not need to have vendor prefixes included. After the Sass-to-CSS compilation, those were added automatically, resulting in the following CSS declaration.
238+
The Sass code of the SharePoint Framework artifact doesn't need to have vendor prefixes included. After the Sass-to-CSS compilation, those were added automatically, resulting in the following CSS declaration.
239239

240240
```css
241241
.container_7e976ae1 {
@@ -245,11 +245,11 @@ The Sass code of the SharePoint Framework artefact does not need to have vendor
245245
}
246246
```
247247

248-
Removing already applied prefixes does not only make the code of the artefact cleaner, it also makes it easier to read and future-ready. This process is also configured to support only SharePoint Framework-supported browsers and makes it more error-safe.
248+
Removing already applied prefixes doesn't only make the code of the artifact cleaner, it also makes it easier to read and future-ready. This process is also configured to support only SharePoint Framework-supported browsers and makes it more error-safe.
249249

250-
In case a web part already has vendor prefixes included in the Sass files that are not needed anymore, the same process removes those declarations automatically.
250+
In case a web part already has vendor prefixes included in the Sass files that aren't needed anymore, the same process removes those declarations automatically.
251251

252-
The following example makes use of the `border-radius` property, which does not require vendor prefixes on the supported systems.
252+
The following example makes use of the `border-radius` property, which doesn't require vendor prefixes on the supported systems.
253253

254254
```css
255255
.container {
@@ -270,7 +270,7 @@ The resulting CSS in the package is converted to the following code.
270270
}
271271
```
272272

273-
For more information about auto-prefixing, see the [autoprefixer](https://github.com/postcss/autoprefixer) GitHub repository. The database for this process is available on [Can I use?](https://caniuse.com).
273+
For more information about auto-prefixing, see the [Autoprefixer](https://github.com/postcss/autoprefixer) GitHub repository. The database for this process is available on [Can I use?](https://caniuse.com). If you’re not using a build pipeline, you can also use online autoprefixing tools to automatically apply vendor prefixes and test different PostCSS and Autoprefixer versions, such as [this online autoprefixer tool](https://goonlinetools.com/autoprefixer/).
274274

275275
## Integrate Fluent UI
276276

@@ -282,6 +282,6 @@ For more information about using Fluent UI in SharePoint Framework, see [Using F
282282

283283
SharePoint allows users to choose the theme color for their sites. In your SharePoint Framework customizations, you should follow the theme selected by the users to make your customization look like an integral part of the site rather than unnecessarily stand out.
284284

285-
Because the theme is set by users on their site, you cannot tell upfront which colors your customization should use, but SharePoint Framework can dynamically load the currently active color scheme automatically for you.
285+
Because the theme is set by users on their site, you can't tell upfront that colors your customization should use, but SharePoint Framework can dynamically load the currently active color scheme automatically for you.
286286

287287
For more information about this capability, see [Use theme colors in your SharePoint Framework customizations](./use-theme-colors-in-your-customizations.md).

0 commit comments

Comments
 (0)