Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename themes to palettes in playground imports #3543

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/updating/8-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ In previous versions, it was recommended to define the dark theme in the followi
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:

```css
/* @import '@ionic/angular/css/themes/dark.always.css'; */
/* @import "@ionic/angular/css/themes/dark.class.css"; */
@import '@ionic/angular/css/themes/dark.system.css';
/* @import '@ionic/angular/css/palettes/dark.always.css'; */
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
@import '@ionic/angular/css/palettes/dark.system.css';
```

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.
Expand Down
6 changes: 3 additions & 3 deletions static/code/stackblitz/v8/angular/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
* https://ionicframework.com/docs/theming/dark-mode
*/

/* @import "~@ionic/angular/css/themes/dark.always.css"; */
/* @import "~@ionic/angular/css/themes/dark.class.css"; */
@import "~@ionic/angular/css/themes/dark.system.css";
/* @import "~@ionic/angular/css/palettes/dark.always.css"; */
/* @import "~@ionic/angular/css/palettes/dark.class.css"; */
@import "~@ionic/angular/css/palettes/dark.system.css";
6 changes: 3 additions & 3 deletions static/code/stackblitz/v8/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import '@ionic/core/css/display.css';
* https://ionicframework.com/docs/theming/dark-mode
*/

// import '@ionic/core/css/themes/dark.always.css';
// import '@ionic/core/css/themes/dark.class.css';
import '@ionic/core/css/themes/dark.system.css';
// import '@ionic/core/css/palettes/dark.always.css';
// import '@ionic/core/css/palettes/dark.class.css';
import '@ionic/core/css/palettes/dark.system.css';

/* Theme variables */
import './theme/variables.css';
Expand Down
6 changes: 3 additions & 3 deletions static/code/stackblitz/v8/react/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import '@ionic/react/css/display.css';
* https://ionicframework.com/docs/theming/dark-mode
*/

// import '@ionic/react/css/themes/dark.always.css';
// import '@ionic/react/css/themes/dark.class.css';
import '@ionic/react/css/themes/dark.system.css';
// import '@ionic/react/css/palettes/dark.always.css';
// import '@ionic/react/css/palettes/dark.class.css';
import '@ionic/react/css/palettes/dark.system.css';

/* Theme variables */
import './theme/variables.css';
Expand Down
6 changes: 3 additions & 3 deletions static/code/stackblitz/v8/react/app.withContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import '@ionic/react/css/display.css';
* https://ionicframework.com/docs/theming/dark-mode
*/

// import '@ionic/react/css/themes/dark.always.css';
// import '@ionic/react/css/themes/dark.class.css';
import '@ionic/react/css/themes/dark.system.css';
// import '@ionic/react/css/palettes/dark.always.css';
// import '@ionic/react/css/palettes/dark.class.css';
import '@ionic/react/css/palettes/dark.system.css';

/* Theme variables */
import './theme/variables.css';
Expand Down
6 changes: 3 additions & 3 deletions static/code/stackblitz/v8/vue/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import '@ionic/vue/css/display.css';
* https://ionicframework.com/docs/theming/dark-mode
*/

// import '@ionic/vue/css/themes/dark.always.css';
// import '@ionic/vue/css/themes/dark.class.css';
import '@ionic/vue/css/themes/dark.system.css';
// import '@ionic/vue/css/palettes/dark.always.css';
// import '@ionic/vue/css/palettes/dark.class.css';
import '@ionic/vue/css/palettes/dark.system.css';

/* Theme variables */
import './theme/variables.css';
Expand Down
2 changes: 1 addition & 1 deletion static/usage/v8/common.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const linkElement = document.createElement('link');

linkElement.rel = 'stylesheet';
linkElement.href = 'https://cdn.jsdelivr.net/npm/@ionic/core@next/css/themes/dark.class.css';
linkElement.href = 'https://cdn.jsdelivr.net/npm/@ionic/core@next/css/palettes/dark.class.css';

document.head.appendChild(linkElement);

Expand Down