Skip to content

Commit

Permalink
fix(skeleton-text): add and document custom properties
Browse files Browse the repository at this point in the history
references #14850
  • Loading branch information
camwiegert committed Aug 24, 2018
1 parent 37a149c commit b213500
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
7 changes: 7 additions & 0 deletions core/src/components/skeleton-text/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |


## CSS Custom Properties

| Name | Description |
| -------------- | ------------------------------- |
| `--background` | Background of the skeleton text |


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
6 changes: 5 additions & 1 deletion core/src/components/skeleton-text/skeleton-text.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
// iOS Skeleton Text
// --------------------------------------------------

:host {
--background: #{$skeleton-text-ios-bar-background-color};
}

span {
background-color: $skeleton-text-ios-bar-background-color;
background: var(--background);

opacity: $skeleton-text-ios-bar-opacity;
}
6 changes: 5 additions & 1 deletion core/src/components/skeleton-text/skeleton-text.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
// Material Design Skeleton Text
// --------------------------------------------------

:host {
--background: #{$skeleton-text-md-bar-background-color};
}

span {
background-color: $skeleton-text-md-bar-background-color;
background: var(--background);

opacity: $skeleton-text-md-bar-opacity;
}
4 changes: 4 additions & 0 deletions core/src/components/skeleton-text/skeleton-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
// --------------------------------------------------

:host {
/**
* --background: Background of the skeleton text
*/

display: inline-block;

width: 100%;
Expand Down

0 comments on commit b213500

Please sign in to comment.