From 1e2946e0f9ecf80ba92c8d95d6bd634777eea44c Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 29 Jan 2020 14:24:45 -0500 Subject: [PATCH] docs(ripple-effect): update usage to avoid style conflicts with Ionic components (#20331) closes ionic-team/ionic-docs#1154 --- core/src/components/ripple-effect/readme.md | 34 +++++++++---------- .../components/ripple-effect/usage/angular.md | 10 +++--- .../ripple-effect/usage/javascript.md | 10 +++--- .../components/ripple-effect/usage/react.md | 10 +++--- .../src/components/ripple-effect/usage/vue.md | 10 +++--- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/src/components/ripple-effect/readme.md b/core/src/components/ripple-effect/readme.md index b685dd452b..53447b1e6d 100644 --- a/core/src/components/ripple-effect/readme.md +++ b/core/src/components/ripple-effect/readme.md @@ -2,9 +2,9 @@ The ripple effect component adds the [Material Design ink ripple interaction effect](https://material.io/develop/web/components/ripples/). This component can only be used inside of an `` and can be added to any component. -It's important to note that the parent should have [relative positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/position) because the ripple effect is absolutely positioned and will cover the closest parent with relative positioning. The parent element should also be given the `ion-activatable` class, which tells the ripple effect that the element is clickable. It's recommended to add `overflow: hidden` to the parent element, as well, to avoid the ripple overflowing its container. +It's important to note that the parent should have [relative positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/position) because the ripple effect is absolutely positioned and will cover the closest parent with relative positioning. The parent element should also be given the `ion-activatable` class, which tells the ripple effect that the element is clickable. -The default type, `"bounded"`, will expand the ripple effect from the click position outwards. To add a ripple effect that always starts in the center of the element and expands in a circle, add an `"unbounded"` type. +The default type, `"bounded"`, will expand the ripple effect from the click position outwards. To add a ripple effect that always starts in the center of the element and expands in a circle, add an `"unbounded"` type. It's recommended to add `overflow: hidden` to the parent element to avoid the ripple overflowing its container, especially with an unbounded ripple. @@ -16,22 +16,22 @@ The default type, `"bounded"`, will expand the ripple effect from the click posi ```html -
+
A plain div with a bounded ripple effect
- -
+
A plain div with an unbounded ripple effect
- @@ -40,7 +40,7 @@ The default type, `"bounded"`, will expand the ripple effect from the click posi ``` ```css -.ion-activatable { +.ripple-parent { position: relative; overflow: hidden; } @@ -57,22 +57,22 @@ import './RippleEffectExample.css'; export const RippleExample: React.FC = () => ( -
+
A plain div with a bounded ripple effect
- -
+
A plain div with an unbounded ripple effect
- @@ -82,7 +82,7 @@ export const RippleExample: React.FC = () => ( ``` ```css -.ion-activatable { +.ripple-parent { position: relative; overflow: hidden; } @@ -95,22 +95,22 @@ export const RippleExample: React.FC = () => (