Skip to content

Commit 93a38c0

Browse files
committed
chore: replace diff examples with before/after
Docusaurus does not have built-in support for diff formatting. To make it easier for developers to tell the differences between the legacy code and new approach, I separated the examples into before/after code snippet blocks.
1 parent c5b863f commit 93a38c0

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

docs/updating/8-0.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,30 @@ Using the newly imported dark palette mentioned above will also import these new
138138

139139
`--ion-color-step-[number]` usages for **background color** can be migrated by renaming the token to `--ion-background-color-step-[number]`.
140140

141-
**Example**:
141+
**Before**:
142142

143-
```diff
144-
button {
145-
- background: var(--ion-color-step-400);
146-
+ background: var(--ion-background-color-step-400);
147-
}
143+
```html
144+
button { background: var(--ion-color-step-400); }
145+
```
146+
147+
**After**:
148+
149+
```html
150+
button { background: var(--ion-background-color-step-400); }
148151
```
149152

150153
`--ion-color-step-[number]` usages for **text color** can be migrated by renaming the token to `--ion-text-color-step-[number]` and subtracting the number from 1000.
151154

152-
**Example**:
155+
**Before**:
153156

154-
```diff
155-
button {
156-
- color: var(--ion-color-step-400);
157-
+ color: var(--ion-text-color-step-600); /* 1000 - 400 = 600 */
158-
}
157+
```html
158+
button { color: var(--ion-color-step-400); }
159+
```
160+
161+
**After**:
162+
163+
```html
164+
button { color: var(--ion-text-color-step-600); /* 1000 - 400 = 600 */ }
159165
```
160166

161167
The [stepped color generator](../theming/themes#stepped-color-generator) has been updated to generate text and background color stepped variables.
@@ -178,9 +184,16 @@ The `angular.json` file currently imports `src/theme/variables.scss` before impo
178184

179185
We recommend importing the `src/global.scss` file first instead:
180186

181-
```diff
182-
- "styles": ["src/theme/variables.scss", "src/global.scss"],
183-
+ "styles": ["src/global.scss", "src/theme/variables.scss"],
187+
**Before**:
188+
189+
```json
190+
"styles": ["src/theme/variables.scss", "src/global.scss"],
191+
```
192+
193+
**After**:
194+
195+
```json
196+
"styles": ["src/global.scss", "src/theme/variables.scss"],
184197
```
185198

186199
## Required Changes

0 commit comments

Comments
 (0)