From ea3c838bcd9ebaf7de45ad28b48384eda7f5d727 Mon Sep 17 00:00:00 2001 From: Samuel Portz Date: Wed, 27 Sep 2017 14:10:00 +0200 Subject: [PATCH 1/2] Added variable and default for min-width of .toggle-container --- paper-toggle-button.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper-toggle-button.html b/paper-toggle-button.html index e5540e1..cafb499 100644 --- a/paper-toggle-button.html +++ b/paper-toggle-button.html @@ -47,6 +47,7 @@ `--paper-toggle-button-checked-ink` | Mixin applied to the ripple when the input is checked | `{}` `--paper-toggle-button-label-color` | Label color | `--primary-text-color` `--paper-toggle-button-label-spacing` | Spacing between the label and the button | `8px` +`--paper-toggle-button-button-container-min-width` | Minimum width of the container for the bar and the button | `36px` This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`. In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`. @@ -164,6 +165,7 @@ position: relative; width: 36px; height: 14px; + min-width: var(--paper-toggle-button-button-container-min-width, 36px); /* The toggle button has an absolute position of -3px; The extra 1px /* accounts for the toggle button shadow box. */ margin: 4px 1px; From a3b9591c97d0d55a059ce006218627b1cbdc14b1 Mon Sep 17 00:00:00 2001 From: Samuel Portz Date: Thu, 29 Mar 2018 12:48:13 +0200 Subject: [PATCH 2/2] Added typescript declartion --- paper-toggle-button.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-toggle-button.d.ts b/paper-toggle-button.d.ts index 6584a2b..59f69b3 100644 --- a/paper-toggle-button.d.ts +++ b/paper-toggle-button.d.ts @@ -47,6 +47,7 @@ * `--paper-toggle-button-checked-ink` | Mixin applied to the ripple when the input is checked | `{}` * `--paper-toggle-button-label-color` | Label color | `--primary-text-color` * `--paper-toggle-button-label-spacing` | Spacing between the label and the button | `8px` + * `--paper-toggle-button-button-container-min-width` | Minimum width of the container for the bar and the button | `36px` * * This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`. * In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.