Skip to content

Commit b0a10df

Browse files
authored
fix(angular): schematics account for new theme files (#29185)
Issue number: Internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> While doing other work I noticed that the Angular schematics still reference the old dark theme. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - The Angular schematics now import the new dark theme found in Ionic v8. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent 63a2d4f commit b0a10df

File tree

1 file changed

+10
-247
lines changed
  • packages/angular/src/schematics/add/files/root/theme

1 file changed

+10
-247
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,247 +1,10 @@
1-
/* Ionic Variables and Theming. */
2-
/* This is just a placeholder file For more info, please see: */
3-
/* https://ionicframework.com/docs/theming/basics */
4-
5-
/* To quickly generate your own theme, check out the color generator */
6-
/* https://ionicframework.com/docs/theming/color-generator */
7-
8-
/** Ionic CSS Variables **/
9-
:root {
10-
/** primary **/
11-
--ion-color-primary: #3880ff;
12-
--ion-color-primary-rgb: 56, 128, 255;
13-
--ion-color-primary-contrast: #ffffff;
14-
--ion-color-primary-contrast-rgb: 255, 255, 255;
15-
--ion-color-primary-shade: #3171e0;
16-
--ion-color-primary-tint: #4c8dff;
17-
18-
/** secondary **/
19-
--ion-color-secondary: #3dc2ff;
20-
--ion-color-secondary-rgb: 61, 194, 255;
21-
--ion-color-secondary-contrast: #ffffff;
22-
--ion-color-secondary-contrast-rgb: 255, 255, 255;
23-
--ion-color-secondary-shade: #36abe0;
24-
--ion-color-secondary-tint: #50c8ff;
25-
26-
/** tertiary **/
27-
--ion-color-tertiary: #5260ff;
28-
--ion-color-tertiary-rgb: 82, 96, 255;
29-
--ion-color-tertiary-contrast: #ffffff;
30-
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
31-
--ion-color-tertiary-shade: #4854e0;
32-
--ion-color-tertiary-tint: #6370ff;
33-
34-
/** success **/
35-
--ion-color-success: #2dd36f;
36-
--ion-color-success-rgb: 45, 211, 111;
37-
--ion-color-success-contrast: #ffffff;
38-
--ion-color-success-contrast-rgb: 255, 255, 255;
39-
--ion-color-success-shade: #28ba62;
40-
--ion-color-success-tint: #42d77d;
41-
42-
/** warning **/
43-
--ion-color-warning: #ffc409;
44-
--ion-color-warning-rgb: 255, 196, 9;
45-
--ion-color-warning-contrast: #000000;
46-
--ion-color-warning-contrast-rgb: 0, 0, 0;
47-
--ion-color-warning-shade: #e0ac08;
48-
--ion-color-warning-tint: #ffca22;
49-
50-
/** danger **/
51-
--ion-color-danger: #eb445a;
52-
--ion-color-danger-rgb: 235, 68, 90;
53-
--ion-color-danger-contrast: #ffffff;
54-
--ion-color-danger-contrast-rgb: 255, 255, 255;
55-
--ion-color-danger-shade: #cf3c4f;
56-
--ion-color-danger-tint: #ed576b;
57-
58-
/** dark **/
59-
--ion-color-dark: #222428;
60-
--ion-color-dark-rgb: 34, 36, 40;
61-
--ion-color-dark-contrast: #ffffff;
62-
--ion-color-dark-contrast-rgb: 255, 255, 255;
63-
--ion-color-dark-shade: #1e2023;
64-
--ion-color-dark-tint: #383a3e;
65-
66-
/** medium **/
67-
--ion-color-medium: #92949c;
68-
--ion-color-medium-rgb: 146, 148, 156;
69-
--ion-color-medium-contrast: #ffffff;
70-
--ion-color-medium-contrast-rgb: 255, 255, 255;
71-
--ion-color-medium-shade: #808289;
72-
--ion-color-medium-tint: #9d9fa6;
73-
74-
/** light **/
75-
--ion-color-light: #f4f5f8;
76-
--ion-color-light-rgb: 244, 245, 248;
77-
--ion-color-light-contrast: #000000;
78-
--ion-color-light-contrast-rgb: 0, 0, 0;
79-
--ion-color-light-shade: #d7d8da;
80-
--ion-color-light-tint: #f5f6f9;
81-
}
82-
83-
@media (prefers-color-scheme: dark) {
84-
/*
85-
* Dark Colors
86-
* -------------------------------------------
87-
*/
88-
89-
body {
90-
--ion-color-primary: #428cff;
91-
--ion-color-primary-rgb: 66, 140, 255;
92-
--ion-color-primary-contrast: #ffffff;
93-
--ion-color-primary-contrast-rgb: 255, 255, 255;
94-
--ion-color-primary-shade: #3a7be0;
95-
--ion-color-primary-tint: #5598ff;
96-
97-
--ion-color-secondary: #50c8ff;
98-
--ion-color-secondary-rgb: 80, 200, 255;
99-
--ion-color-secondary-contrast: #ffffff;
100-
--ion-color-secondary-contrast-rgb: 255, 255, 255;
101-
--ion-color-secondary-shade: #46b0e0;
102-
--ion-color-secondary-tint: #62ceff;
103-
104-
--ion-color-tertiary: #6a64ff;
105-
--ion-color-tertiary-rgb: 106, 100, 255;
106-
--ion-color-tertiary-contrast: #ffffff;
107-
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
108-
--ion-color-tertiary-shade: #5d58e0;
109-
--ion-color-tertiary-tint: #7974ff;
110-
111-
--ion-color-success: #2fdf75;
112-
--ion-color-success-rgb: 47, 223, 117;
113-
--ion-color-success-contrast: #000000;
114-
--ion-color-success-contrast-rgb: 0, 0, 0;
115-
--ion-color-success-shade: #29c467;
116-
--ion-color-success-tint: #44e283;
117-
118-
--ion-color-warning: #ffd534;
119-
--ion-color-warning-rgb: 255, 213, 52;
120-
--ion-color-warning-contrast: #000000;
121-
--ion-color-warning-contrast-rgb: 0, 0, 0;
122-
--ion-color-warning-shade: #e0bb2e;
123-
--ion-color-warning-tint: #ffd948;
124-
125-
--ion-color-danger: #ff4961;
126-
--ion-color-danger-rgb: 255, 73, 97;
127-
--ion-color-danger-contrast: #ffffff;
128-
--ion-color-danger-contrast-rgb: 255, 255, 255;
129-
--ion-color-danger-shade: #e04055;
130-
--ion-color-danger-tint: #ff5b71;
131-
132-
--ion-color-dark: #f4f5f8;
133-
--ion-color-dark-rgb: 244, 245, 248;
134-
--ion-color-dark-contrast: #000000;
135-
--ion-color-dark-contrast-rgb: 0, 0, 0;
136-
--ion-color-dark-shade: #d7d8da;
137-
--ion-color-dark-tint: #f5f6f9;
138-
139-
--ion-color-medium: #989aa2;
140-
--ion-color-medium-rgb: 152, 154, 162;
141-
--ion-color-medium-contrast: #000000;
142-
--ion-color-medium-contrast-rgb: 0, 0, 0;
143-
--ion-color-medium-shade: #86888f;
144-
--ion-color-medium-tint: #a2a4ab;
145-
146-
--ion-color-light: #222428;
147-
--ion-color-light-rgb: 34, 36, 40;
148-
--ion-color-light-contrast: #ffffff;
149-
--ion-color-light-contrast-rgb: 255, 255, 255;
150-
--ion-color-light-shade: #1e2023;
151-
--ion-color-light-tint: #383a3e;
152-
}
153-
154-
/*
155-
* iOS Dark Theme
156-
* -------------------------------------------
157-
*/
158-
159-
.ios body {
160-
--ion-background-color: #000000;
161-
--ion-background-color-rgb: 0, 0, 0;
162-
163-
--ion-text-color: #ffffff;
164-
--ion-text-color-rgb: 255, 255, 255;
165-
166-
--ion-color-step-50: #0d0d0d;
167-
--ion-color-step-100: #1a1a1a;
168-
--ion-color-step-150: #262626;
169-
--ion-color-step-200: #333333;
170-
--ion-color-step-250: #404040;
171-
--ion-color-step-300: #4d4d4d;
172-
--ion-color-step-350: #595959;
173-
--ion-color-step-400: #666666;
174-
--ion-color-step-450: #737373;
175-
--ion-color-step-500: #808080;
176-
--ion-color-step-550: #8c8c8c;
177-
--ion-color-step-600: #999999;
178-
--ion-color-step-650: #a6a6a6;
179-
--ion-color-step-700: #b3b3b3;
180-
--ion-color-step-750: #bfbfbf;
181-
--ion-color-step-800: #cccccc;
182-
--ion-color-step-850: #d9d9d9;
183-
--ion-color-step-900: #e6e6e6;
184-
--ion-color-step-950: #f2f2f2;
185-
186-
--ion-item-background: #000000;
187-
188-
--ion-card-background: #1c1c1d;
189-
}
190-
191-
.ios ion-modal {
192-
--ion-background-color: var(--ion-color-step-100);
193-
--ion-toolbar-background: var(--ion-color-step-150);
194-
--ion-toolbar-border-color: var(--ion-color-step-250);
195-
}
196-
197-
/*
198-
* Material Design Dark Theme
199-
* -------------------------------------------
200-
*/
201-
202-
.md body {
203-
--ion-background-color: #121212;
204-
--ion-background-color-rgb: 18, 18, 18;
205-
206-
--ion-text-color: #ffffff;
207-
--ion-text-color-rgb: 255, 255, 255;
208-
209-
--ion-border-color: #222222;
210-
211-
--ion-color-step-50: #1e1e1e;
212-
--ion-color-step-100: #2a2a2a;
213-
--ion-color-step-150: #363636;
214-
--ion-color-step-200: #414141;
215-
--ion-color-step-250: #4d4d4d;
216-
--ion-color-step-300: #595959;
217-
--ion-color-step-350: #656565;
218-
--ion-color-step-400: #717171;
219-
--ion-color-step-450: #7d7d7d;
220-
--ion-color-step-500: #898989;
221-
--ion-color-step-550: #949494;
222-
--ion-color-step-600: #a0a0a0;
223-
--ion-color-step-650: #acacac;
224-
--ion-color-step-700: #b8b8b8;
225-
--ion-color-step-750: #c4c4c4;
226-
--ion-color-step-800: #d0d0d0;
227-
--ion-color-step-850: #dbdbdb;
228-
--ion-color-step-900: #e7e7e7;
229-
--ion-color-step-950: #f3f3f3;
230-
231-
--ion-item-background: #1e1e1e;
232-
233-
--ion-toolbar-background: #1f1f1f;
234-
235-
--ion-tab-bar-background: #1f1f1f;
236-
237-
--ion-card-background: #1e1e1e;
238-
}
239-
}
240-
241-
html {
242-
/*
243-
* For more information on dynamic font scaling, visit the documentation:
244-
* https://ionicframework.com/docs/layout/dynamic-font-scaling
245-
*/
246-
--ion-dynamic-font: var(--ion-default-dynamic-font);
247-
}
1+
/**
2+
* Ionic Dark Theme
3+
* -----------------------------------------------------
4+
* For more info, please see:
5+
* https://ionicframework.com/docs/theming/dark-mode
6+
*/
7+
8+
/* @import "@ionic/angular/css/palettes/dark.always.css"; */
9+
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
10+
@import "@ionic/angular/css/palettes/dark.system.css";

0 commit comments

Comments
 (0)