diff options
Diffstat (limited to 'src/styles/toggle.scss')
-rw-r--r-- | src/styles/toggle.scss | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/src/styles/toggle.scss b/src/styles/toggle.scss index 5b47e6495..0ce0c3379 100644 --- a/src/styles/toggle.scss +++ b/src/styles/toggle.scss | |||
@@ -4,44 +4,46 @@ $toggle-size: 14px; | |||
4 | $toggle-width: 40px; | 4 | $toggle-width: 40px; |
5 | $toggle-button-size: 22px; | 5 | $toggle-button-size: 22px; |
6 | 6 | ||
7 | .franz-form { | 7 | .theme__dark .franz-form .franz-form__toggle-wrapper .franz-form__toggle { |
8 | .franz-form__toggle-wrapper { | 8 | background: $dark-theme-gray; |
9 | display: flex; | 9 | border-radius: $toggle-size / 2; |
10 | flex-direction: row; | ||
11 | 10 | ||
12 | .franz-form__label { | 11 | .franz-form__toggle-button { |
13 | margin-left: 20px; | 12 | background: $dark-theme-gray-lighter; |
13 | box-shadow: 0 1px 4px rgba($dark-theme-black, .3); | ||
14 | } | ||
15 | } | ||
16 | |||
17 | .franz-form .franz-form__toggle-wrapper { | ||
18 | display: flex; | ||
19 | flex-direction: row; | ||
20 | |||
21 | .franz-form__label { margin-left: 20px; } | ||
22 | |||
23 | .franz-form__toggle { | ||
24 | background: $theme-gray-lighter; | ||
25 | border-radius: $theme-border-radius; | ||
26 | height: $toggle-size; | ||
27 | position: relative; | ||
28 | width: $toggle-width; | ||
29 | |||
30 | .franz-form__toggle-button { | ||
31 | background: $theme-gray-light; | ||
32 | border-radius: 100%; | ||
33 | box-shadow: 0 1px 4px rgba(0, 0, 0, .3); | ||
34 | height: $toggle-size - 2; | ||
35 | left: 1px; | ||
36 | top: 1px; | ||
37 | position: absolute; | ||
38 | transition: all .5s; | ||
39 | width: $toggle-size - 2; | ||
14 | } | 40 | } |
15 | 41 | ||
16 | .franz-form__toggle { | 42 | &.is-active .franz-form__toggle-button { |
17 | width: $toggle-width; | 43 | background: $theme-brand-primary; |
18 | height: $toggle-size; | 44 | left: $toggle-width - $toggle-size - 3;; |
19 | position: relative; | ||
20 | background: $theme-gray-lighter; | ||
21 | border-radius: $theme-border-radius; | ||
22 | |||
23 | .franz-form__toggle-button { | ||
24 | position: absolute; | ||
25 | left: 0; | ||
26 | top: -($toggle-button-size - $toggle-size) / 2; | ||
27 | width: $toggle-button-size; | ||
28 | height: $toggle-button-size; | ||
29 | background: $theme-gray-light; | ||
30 | border-radius: 100%; | ||
31 | transition: all 0.5s; | ||
32 | box-shadow: 0 1px 4px rgba(0,0,0,0.3); | ||
33 | } | ||
34 | |||
35 | &.is-active { | ||
36 | .franz-form__toggle-button { | ||
37 | left: $toggle-width - $toggle-button-size; | ||
38 | background: $theme-brand-primary; | ||
39 | } | ||
40 | } | ||
41 | |||
42 | input { | ||
43 | display: none; | ||
44 | } | ||
45 | } | 45 | } |
46 | |||
47 | input { display: none; } | ||
46 | } | 48 | } |
47 | } | 49 | } |