From 37a149cd5de5ca1ae8e9644caecfc5e35076d3ef Mon Sep 17 00:00:00 2001 From: Cam Wiegert Date: Fri, 24 Aug 2018 09:57:39 -0500 Subject: [PATCH] fix(ripple-effect): add and document custom properties references #14850 --- core/src/components/ripple-effect/readme.md | 7 +++++++ core/src/components/ripple-effect/ripple-effect.scss | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/src/components/ripple-effect/readme.md b/core/src/components/ripple-effect/readme.md index aaa88785cc..f3158d0bb5 100644 --- a/core/src/components/ripple-effect/readme.md +++ b/core/src/components/ripple-effect/readme.md @@ -21,6 +21,13 @@ The ripple effect component adds the [Material Design ink ripple interaction eff | `addRipple` | Adds the ripple effect to the parent element | +## CSS Custom Properties + +| Name | Description | +| -------------- | ------------------------------- | +| `--background` | Background of the ripple effect | + + ---------------------------------------------- *Built with [StencilJS](https://stenciljs.com/)* diff --git a/core/src/components/ripple-effect/ripple-effect.scss b/core/src/components/ripple-effect/ripple-effect.scss index 585855e401..7a0681dc22 100644 --- a/core/src/components/ripple-effect/ripple-effect.scss +++ b/core/src/components/ripple-effect/ripple-effect.scss @@ -5,6 +5,11 @@ // -------------------------------------------------- :host { + /** + * @prop --background: Background of the ripple effect + */ + --background: currentColor; + @include position(0, 0, 0, 0); position: absolute; @@ -17,7 +22,7 @@ position: absolute; - background-color: currentColor; + background: var(--background); color: inherit; contain: strict;