mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(item-option): add and document custom properties
references #14850 references #14808 closes #14943
This commit is contained in:
@ -8,6 +8,14 @@
|
|||||||
font-size: $item-option-button-ios-font-size;
|
font-size: $item-option-button-ios-font-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host(.activated) {
|
||||||
|
background: ion-color(primary, shade);
|
||||||
|
}
|
||||||
|
|
||||||
|
:host(.ion-color.activated) {
|
||||||
|
background: current-color(shade);
|
||||||
|
}
|
||||||
|
|
||||||
:host(.in-list.item-options-end:last-child) {
|
:host(.in-list.item-options-end:last-child) {
|
||||||
@include safe-area-padding-horizontal(null, .7em);
|
@include safe-area-padding-horizontal(null, .7em);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,15 +4,24 @@
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
--ion-color-base: #{ion-color(primary, base)};
|
/**
|
||||||
--ion-color-contrast: #{ion-color(primary, contrast)};
|
* @prop --background: Background of the item option
|
||||||
|
* @prop --color: Color of the item option
|
||||||
|
*/
|
||||||
|
--background: #{ion-color(primary, base)};
|
||||||
|
--color: #{ion-color(primary, contrast)};
|
||||||
|
|
||||||
background: #{current-color(base)};
|
background: var(--background);
|
||||||
color: #{current-color(contrast)};
|
color: var(--color);
|
||||||
|
|
||||||
font-family: $font-family-base;
|
font-family: $font-family-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host(.ion-color) {
|
||||||
|
background: current-color(base);
|
||||||
|
color: current-color(contrast);
|
||||||
|
}
|
||||||
|
|
||||||
.item-option-native {
|
.item-option-native {
|
||||||
@include text-inherit();
|
@include text-inherit();
|
||||||
@include padding(0, .7em);
|
@include padding(0, .7em);
|
||||||
|
|||||||
@ -18,6 +18,14 @@ action for the item.
|
|||||||
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `Mode` |
|
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `Mode` |
|
||||||
|
|
||||||
|
|
||||||
|
## CSS Custom Properties
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
| -------------- | ----------------------------- |
|
||||||
|
| `--background` | Background of the item option |
|
||||||
|
| `--color` | Color of the item option |
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
*Built with [StencilJS](https://stenciljs.com/)*
|
*Built with [StencilJS](https://stenciljs.com/)*
|
||||||
|
|||||||
Reference in New Issue
Block a user