Skip to content

Commit ebe7f61

Browse files
committed
Fabric doc formatting adjustments
1 parent ea67398 commit ebe7f61

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

docs/spfx/web-parts/guidance/office-ui-fabric-integration.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,15 @@ Here are some additional insights on the other approaches which were considered,
121121

122122
**Office UI Fabric Core**
123123

124-
- The web part developer will not be required to do anything explicitly to get the scoping to work.
125-
- We plan to solve this problem through CSS specificity and descendant selector. The Fabric Core team will ship
126-
multiple copies of Fabric Core css. e.g. fabric-6.css, fabric-6-scoped.css, fabric-6.0.0.css,
127-
fabric-6.0.0-scoped.css.
128-
- All the styles in the scoped css files are inside a descendant selector e.g. "ms-Fabric-core--v6 ms-Icon--list".
129-
- At compile time tooling will collect the version of the Office UI Fabric Core the web part was built with. This
130-
version can be the one that comes with SPFx. Alternatively, web part developers could take an explicit dependency
131-
on a specific version if Office UI Fabric Core in their package.json file.
132-
- The web part div will be assigned this scope i.e. <div data-sp-webpart class="ms-Fabric-core--v6">
133-
- The framework will load the specific major version of the Fabric core scoped css file. If the web part is built
134-
with version 6.0.0 of Fabric core css, the framework will download fabric-6-scoped.css at web part load time.
135-
- The rest of the page will contain unscoped Office UI Fabric Core.
136-
- This way, as per CSS specificity rules, the scoped CSS take precedence inside the web part div.
137-
- The whole web part and its contents will allign to a specific version of Office UI Fabric Core the developer has chosen.
138-
- **Overriding** Fabric Core styles is not supported.
124+
The web part developer will not be required to do anything explicitly to get the scoping to work. We plan to solve this problem through CSS specificity and descendant selector. The Fabric Core team will ship multiple copies of Fabric Core css. e.g. `fabric-6.css`, `fabric-6-scoped.css`, `fabric-6.0.0.css`, `fabric-6.0.0-scoped.css`.
125+
126+
All the styles in the scoped css files are inside a descendant selector e.g. "ms-Fabric-core--v6 ms-Icon--list". At compile time tooling will collect the version of the Office UI Fabric Core the web part was built with. This version can be the one that comes with SPFx. Alternatively, web part developers could take an explicit dependency on a specific version if Office UI Fabric Core in their package.json file.
127+
128+
The web part div will be assigned this scope i.e. `<div data-sp-webpart class="ms-Fabric-core--v6">`. The framework will load the specific major version of the Fabric core scoped css file. If the web part is built with version 6.0.0 of Fabric core css, the framework will download fabric-6-scoped.css at web part load time.
129+
130+
The rest of the page will contain unscoped Office UI Fabric Core. This way, as per CSS specificity rules, the scoped CSS take precedence inside the web part div.The whole web part and its contents will allign to a specific version of Office UI Fabric Core the developer has chosen.
131+
132+
**Overriding** Fabric Core styles is not supported.
139133

140134
```Javascript
141135
// Sample of how the scoping would work.
@@ -172,8 +166,9 @@ following example, only ms-Fabric-core--v6 will get applied.
172166
</div>
173167
```
174168
175-
To explain this with a simpler example,
176-
```HTML
169+
Here's a more simplistic sample demonstrating the challenge.
170+
171+
```HTML
177172
<html>
178173
<head>
179174
<title>CSS specifity test</title>

0 commit comments

Comments
 (0)