fix(skeleton-text): add and document custom properties

references #14850
This commit is contained in:
Cam Wiegert
2018-08-24 10:21:04 -05:00
parent 37a149cd5d
commit b21350067c
4 changed files with 21 additions and 2 deletions

View File

@ -13,6 +13,13 @@ Skeleton Text is a component for rendering placeholder content. The element will
| `width` | `width` | Width for the element to render at. Default is 100% | `string` | | `width` | `width` | Width for the element to render at. Default is 100% | `string` |
## CSS Custom Properties
| Name | Description |
| -------------- | ------------------------------- |
| `--background` | Background of the skeleton text |
---------------------------------------------- ----------------------------------------------
*Built with [StencilJS](https://stenciljs.com/)* *Built with [StencilJS](https://stenciljs.com/)*

View File

@ -5,8 +5,12 @@
// iOS Skeleton Text // iOS Skeleton Text
// -------------------------------------------------- // --------------------------------------------------
:host {
--background: #{$skeleton-text-ios-bar-background-color};
}
span { span {
background-color: $skeleton-text-ios-bar-background-color; background: var(--background);
opacity: $skeleton-text-ios-bar-opacity; opacity: $skeleton-text-ios-bar-opacity;
} }

View File

@ -5,8 +5,12 @@
// Material Design Skeleton Text // Material Design Skeleton Text
// -------------------------------------------------- // --------------------------------------------------
:host {
--background: #{$skeleton-text-md-bar-background-color};
}
span { span {
background-color: $skeleton-text-md-bar-background-color; background: var(--background);
opacity: $skeleton-text-md-bar-opacity; opacity: $skeleton-text-md-bar-opacity;
} }

View File

@ -5,6 +5,10 @@
// -------------------------------------------------- // --------------------------------------------------
:host { :host {
/**
* --background: Background of the skeleton text
*/
display: inline-block; display: inline-block;
width: 100%; width: 100%;