Skip to content

Commit fc4e5ae

Browse files
fix(progress-bar, spinner): update colors for ionic theme (#30418)
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. --> The colors were not working on progress bar when the theme was ionic; The Spinner with color="medium" should use the contrast variation by design; ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Fix Progress-Bar Ionic Colors; - Change Spinner Medium Color Variation; ## 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/docs/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. --> https://ionic-framework-git-rou-11917-ionic1.vercel.app/src/components/progress-bar/test/basic?ionic:theme=ionic https://ionic-framework-git-rou-11917-ionic1.vercel.app/src/components/spinner/test/color?ionic:theme=ionic
1 parent 1877ac5 commit fc4e5ae

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

core/src/components/progress-bar/progress-bar.common.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@
146146
}
147147
}
148148

149-
:host(.ion-color) {
150-
.progress,
151-
.progress-indeterminate {
152-
background: #{current-color(base)};
153-
}
154-
}
155-
156149
// Progress Bar: Animation Keyframes
157150
// ------------------------------------------------------------------------
158151
// Source: https://github.com/material-components/material-components-web/blob/master/packages/mdc-linear-progress/_keyframes.scss

core/src/components/progress-bar/progress-bar.ionic.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
// Progress Bar: Color
2626
// ------------------------------------------------------------------------
2727

28+
:host(.ion-color) {
29+
.progress,
30+
.progress-indeterminate {
31+
background: #{globals.current-color(base)};
32+
}
33+
}
34+
2835
:host(.ion-color) .buffer-circles {
2936
background-image: radial-gradient(
3037
ellipse at center,

core/src/components/progress-bar/progress-bar.native.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
// Progress Bar: Color
1515
// ------------------------------------------------------------------------
1616

17+
:host(.ion-color) {
18+
.progress,
19+
.progress-indeterminate {
20+
background: #{current-color(base)};
21+
}
22+
}
23+
1724
:host(.ion-color) .buffer-circles {
1825
background-image: radial-gradient(
1926
ellipse at center,

core/src/components/spinner/spinner.ionic.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
height: globals.$ion-scale-700;
1212
}
1313

14+
:host(.ion-color-medium) {
15+
color: #{globals.ion-color(medium, contrast, $subtle: true)};
16+
}
17+
1418
// Spinner: lines / lines-small / lines-sharp / lines-sharp-small
1519
// --------------------------------------------------
1620

0 commit comments

Comments
 (0)