[feature] [v4] make $colors overridable
See original GitHub issueFeature Request
Ionic Info I do not use ionic-cli sorry…
Describe the Feature Request
Be able to override $colors
Describe Preferred Solution
The hard way is to make $colors
!default
in globals.scss
Describe Alternatives
- re-export colors.scss and avoid import globals.scss to override
$colors
. - make
$primary
,$secondary
… colors overridable (!default
)
Additional Context The purpose is to change primary, secondary, … colors and be able to add ours
.ion-color-myColor {
//
}
Thanks anyway for the great job !
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Feature: Allow color theme overrides on the command line ...
I want to be able to override the "highlight" color via a flag, but while we're at it, it seems it might be...
Read more >[Variants] How to keep the icon color override while changing ...
I created a button variant: a button with icons. Then I'm creating an instance and I'm replacing the icon symbol. The color keeps...
Read more >override-colors - CSS: Cascading Style Sheets - MDN Web Docs
The override-colors descriptor takes a comma-separated list of the color index and new color value. The color index is zero-based and any color ......
Read more >Discover how to override theme colors in Bootstrap 5 using Sass
Try declaring the $theme-colors map as advised in this article. You don't need the map-merge command for that! Just make sure to include...
Read more >Unable to override $theme-color in bootstrap - Stack Overflow
To change the primary, or any of the theme colors in Bootstrap 4 SASS, set the appropriate variables before importing bootstrap.scss .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@marticrespi I also created an post on Medium.com how to make it works -> https://medium.com/@paulstelzer/ionic-4-how-to-add-more-colors-and-use-them-as-color-in-buttons-and-more-7175ab4ae4e7
@marticrespi Do not forgot to add
.ion-color-vibrant
(in your case) in the global.scss file. So you need to addAnd afterwards you can use
<ion-button color="vibrant">