You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/updating/8-0.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,9 @@ npm install @ionic/core@next
74
74
75
75
The following changes are not required to update to Ionic 8 as your application will continue to work. However, we recommend making the following changes to ensure you can use the new features in Ionic 8.
76
76
77
-
### Light Theme
77
+
### Light Palette
78
78
79
-
Previous versions shipped a set of default color variables for the light theme:
79
+
Previous versions defined a set of default color variables for the light palette in `theme/variables.scss`:
80
80
81
81
```css
82
82
/** Ionic CSS Variables **/
@@ -90,15 +90,15 @@ Previous versions shipped a set of default color variables for the light theme:
90
90
}
91
91
```
92
92
93
-
In Ionic Framework version 8, the default color palette is included as long as `core.css` is imported. Removing the old color variables ensures that the latest palette is not overwritten.
93
+
In Ionic Framework version 8, these color variables are included as long as `core.css` is imported. The color variables defined in `theme/variables.scss` should be removed to avoid overriding the imported default variables and ensure the app is always using the latest palette.
94
94
95
95
Developers who are customizing this color palette can continue to keep the custom variables values, but any of the variables that use the default values should be removed.
96
96
97
97
You can read more about the new color palette in the [Ionic v8 announcement](https://ionic.io/blog/announcing-the-ionic-8-beta).
98
98
99
-
### Dark Theme
99
+
### Dark Palette
100
100
101
-
In previous versions, it was recommended to define the dark theme in the following way:
101
+
In previous versions, it was recommended to define the dark palette in the following way:
102
102
103
103
```css
104
104
@media (prefers-color-scheme: dark) {
@@ -116,25 +116,25 @@ In previous versions, it was recommended to define the dark theme in the followi
116
116
}
117
117
```
118
118
119
-
In Ionic Framework version 8, the dark theme is being distributed via css files that can be imported. Below is an example of importing a dark theme file in Angular:
119
+
In Ionic Framework version 8, the dark palette is being distributed via css files that can be imported. Below is an example of importing a dark palette file in Angular:
The dark theme is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
127
+
The dark palette is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
128
128
129
-
While migrating to include the new dark theme files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
129
+
While migrating to include the new dark palette files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
130
130
131
-
For more information on the new dark theme files, refer to the [Dark Mode documentation](../theming/dark-mode).
131
+
For more information on the new dark palette files, refer to the [Dark Mode documentation](../theming/dark-mode).
132
132
133
133
### Step Color Tokens
134
134
135
-
To better support the high contrast theme in Ionic 8, separate step colors tokens have been introduced for text and background color. Previously both text and background color were controlled by a single set of `--ion-color-step-[number]` tokens.
135
+
To better support the high contrast palette in Ionic 8, separate step colors tokens have been introduced for text and background color. Previously both text and background color were controlled by a single set of `--ion-color-step-[number]` tokens.
136
136
137
-
Using the newly imported dark theme mentioned above will also import these new step color tokens. However, developers will need to update any step color tokens that were manually defined in an application.
137
+
Using the newly imported dark palette mentioned above will also import these new step color tokens. However, developers will need to update any step color tokens that were manually defined in an application.
138
138
139
139
`--ion-color-step-[number]` usages for **background color** can be migrated by renaming the token to `--ion-background-color-step-[number]`.
140
140
@@ -172,7 +172,7 @@ For more information on the dynamic font, refer to the [Dynamic Font Scaling doc
172
172
173
173
### (Angular Only) `angular.json` CSS import order
174
174
175
-
The `angular.json` file currently imports `src/theme/variables.scss` before importing `src/global.scss`. This may cause the incorrect styles to be applied when customizing the new [Dark Theme](#dark-theme) changes.
175
+
The `angular.json` file currently imports `src/theme/variables.scss` before importing `src/global.scss`. This may cause the incorrect styles to be applied when customizing the new [Dark Palette](#dark-palette) changes.
176
176
177
177
We recommend having the `src/global.scss` file get imported first instead:
0 commit comments