mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
feat(core): add ionic colors (#29707)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
This commit is contained in:
@ -69,6 +69,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Button Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
// Solid Button with Color
|
||||
:host(.button-solid.ion-color) .button-native {
|
||||
background: globals.current-color(base);
|
||||
color: globals.current-color(contrast);
|
||||
}
|
||||
|
||||
// Outline Button with Color
|
||||
:host(.button-outline.ion-color) .button-native {
|
||||
border-color: globals.current-color(base);
|
||||
|
||||
background: transparent;
|
||||
color: globals.current-color(base);
|
||||
}
|
||||
|
||||
// Clear Button with Color
|
||||
:host(.button-clear.ion-color) .button-native {
|
||||
background: transparent;
|
||||
color: globals.current-color(base);
|
||||
}
|
||||
|
||||
// Button Sizes
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
@ -231,6 +254,32 @@
|
||||
--background-hover: #{globals.$ionic-color-neutral-100};
|
||||
}
|
||||
|
||||
/**
|
||||
* Only allow overriding of opacity here
|
||||
* as developers should not be overriding
|
||||
* colors when using the color prop.
|
||||
*/
|
||||
|
||||
:host(.button-solid.ion-color.ion-focused) .button-native::after {
|
||||
background: #{current-color(contrast)};
|
||||
}
|
||||
|
||||
:host(.button-clear.ion-color.ion-focused) .button-native::after,
|
||||
:host(.button-outline.ion-color.ion-focused) .button-native::after {
|
||||
background: #{current-color(base)};
|
||||
}
|
||||
|
||||
@media (any-hover: hover) {
|
||||
:host(.button-solid.ion-color:hover) .button-native::after {
|
||||
background: #{current-color(contrast)};
|
||||
}
|
||||
|
||||
:host(.button-clear.ion-color:hover) .button-native::after,
|
||||
:host(.button-outline.ion-color:hover) .button-native::after {
|
||||
background: #{current-color(base)};
|
||||
}
|
||||
}
|
||||
|
||||
// Button: Disabled
|
||||
// --------------------------------------------------
|
||||
|
||||
@ -257,9 +306,9 @@
|
||||
|
||||
// Default Outline Color
|
||||
:host(.button-outline) {
|
||||
--border-color: #{globals.$ionic-color-primary-base};
|
||||
--border-color: #{globals.ion-color(primary, base)};
|
||||
--background: #{globals.$ionic-color-base-white};
|
||||
--color: #{globals.$ionic-color-primary-base};
|
||||
--color: #{globals.ion-color(primary, base)};
|
||||
}
|
||||
|
||||
// Clear Button
|
||||
|
||||
Reference in New Issue
Block a user