Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Jan 14, 2018
1 parent 649ea84 commit f47df8c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@

Polymer wrapper for Stripe.js v3 Elements. Creates a `card` element such as https://stripe.com/docs/elements

## :fire: Restrictions :fire:
## Note Before Using

The stripe script doesn't work with ShadowDOM, so for now we have to force the ShadyDOM polyfill. Modify your webcomponentsjs include to match the following.

```html
<script>
window.customElements = window.customElements || {};
window.customElements.forcePolyfill = true;
window.ShadyDOM = {force: true};
</script>
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
```
You should make sure to load stripe.js on your app's index.html, as per Stripe's recommendation, before loading `<stripe-elements>`.

## Usage
<!--
Expand Down Expand Up @@ -66,7 +57,7 @@ The following custom properties and mixins are available for styling the `<strip
| `--stripe-elements-element` | Mixin applied to the Stripe Element | {} |
| `--stripe-elements-element-focus` | Mixin applied to the Stripe Element in its focussed state. | {} |
| `--stripe-elements-element-invalid` | Mixin applied to the Stripe Element in ins invalid state | {} |
| `--stripe-elements-element-webkit-autofill | Mixin applied to the Stripe Element's webkit autofill. | {} |
| `--stripe-elements-element-webkit-autofill` | Mixin applied to the Stripe Element's webkit autofill. | {} |

When you apply CSS to the custom properties below, they're parsed and sent to Stripe, who should apply them to the Stripe Element they return in the iFrame. Base styles are inherited by all other variants. `complete` styles are applies when the Stripe Element has valid input. `empty` styles are applied when the Stripe Element has no user input. `invalid` styles are applied when the Stripe Element has invalid input.

Expand Down

0 comments on commit f47df8c

Please sign in to comment.