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
This commit is contained in:
João Ferreira
2025-05-23 17:36:56 +01:00
committed by GitHub
parent 1877ac5dd1
commit fc4e5ae287
4 changed files with 18 additions and 7 deletions

View File

@@ -146,13 +146,6 @@
}
}
:host(.ion-color) {
.progress,
.progress-indeterminate {
background: #{current-color(base)};
}
}
// Progress Bar: Animation Keyframes
// ------------------------------------------------------------------------
// Source: https://github.com/material-components/material-components-web/blob/master/packages/mdc-linear-progress/_keyframes.scss

View File

@@ -25,6 +25,13 @@
// Progress Bar: Color
// ------------------------------------------------------------------------
:host(.ion-color) {
.progress,
.progress-indeterminate {
background: #{globals.current-color(base)};
}
}
:host(.ion-color) .buffer-circles {
background-image: radial-gradient(
ellipse at center,

View File

@@ -14,6 +14,13 @@
// Progress Bar: Color
// ------------------------------------------------------------------------
:host(.ion-color) {
.progress,
.progress-indeterminate {
background: #{current-color(base)};
}
}
:host(.ion-color) .buffer-circles {
background-image: radial-gradient(
ellipse at center,

View File

@@ -11,6 +11,10 @@
height: globals.$ion-scale-700;
}
:host(.ion-color-medium) {
color: #{globals.ion-color(medium, contrast, $subtle: true)};
}
// Spinner: lines / lines-small / lines-sharp / lines-sharp-small
// --------------------------------------------------