mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(item-divider): add and document custom properties
references #14850 references #14808
This commit is contained in:
@ -5,8 +5,8 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
--ion-color-base: #{$item-ios-divider-background};
|
||||
--ion-color-contrast: #{$item-ios-divider-color};
|
||||
--background: #{$item-ios-divider-background};
|
||||
--color: #{$item-ios-divider-color};
|
||||
--padding-start: #{$item-ios-divider-padding-start};
|
||||
|
||||
@include border-radius(0);
|
||||
|
@ -5,8 +5,8 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
--ion-color-base: #{$item-md-divider-background};
|
||||
--ion-color-contrast: #{$item-md-divider-color};
|
||||
--background: #{$item-md-divider-background};
|
||||
--color: #{$item-md-divider-color};
|
||||
--padding-start: #{$item-md-divider-padding-start};
|
||||
|
||||
border-bottom: $item-md-divider-border-bottom;
|
||||
|
@ -5,6 +5,14 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
/**
|
||||
* @prop --background: Background of the item divider
|
||||
* @prop --color: Color of the item divider
|
||||
* @prop --padding-start: Start padding of the item divider
|
||||
* @prop --padding-end: End padding of the item divider
|
||||
* @prop --padding-top: Top padding of the item divider
|
||||
* @prop --padding-bottom: Bottom padding of the item divider
|
||||
*/
|
||||
--padding-start: 0px;
|
||||
--padding-end: 0px;
|
||||
--padding-top: 0px;
|
||||
@ -27,8 +35,8 @@
|
||||
width: 100%;
|
||||
min-height: $item-divider-min-height;
|
||||
|
||||
background-color: #{current-color(base)};
|
||||
color: #{current-color(contrast)};
|
||||
background: var(--background);
|
||||
color: var(--color);
|
||||
|
||||
font-family: $font-family-base;
|
||||
|
||||
@ -37,6 +45,11 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:host(.ion-color) {
|
||||
background: current-color(base);
|
||||
color: current-color(contrast);
|
||||
}
|
||||
|
||||
:host([sticky]) {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
@ -13,6 +13,18 @@ Item Dividers are block elements that can be used to separate items in a list. T
|
||||
| `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 divider |
|
||||
| `--color` | Color of the item divider |
|
||||
| `--padding-bottom` | Bottom padding of the item divider |
|
||||
| `--padding-end` | End padding of the item divider |
|
||||
| `--padding-start` | Start padding of the item divider |
|
||||
| `--padding-top` | Top padding of the item divider |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
*Built with [StencilJS](https://stenciljs.com/)*
|
||||
|
Reference in New Issue
Block a user