about summary refs log tree commit diff
path: root/app/assets/stylesheets/components.scss
diff options
context:
space:
mode:
authornicolas <nclm@users.noreply.github.com>2016-11-24 20:13:30 +0100
committerGitHub <noreply@github.com>2016-11-24 20:13:30 +0100
commit60577f4c6ee9f4a4c9af0a41a8954e19a5f2c8cf (patch)
tree8c661ea7ceaff780965631c530ca065805c1861d /app/assets/stylesheets/components.scss
parent5e33445c5ff9ded56c2d40eb17d89ace108c3840 (diff)
parent8e34bed7cce7b97388e55fabacee7d424b5846ea (diff)
Merge branch 'master' into french-translation
Diffstat (limited to 'app/assets/stylesheets/components.scss')
-rw-r--r--app/assets/stylesheets/components.scss106
1 files changed, 106 insertions, 0 deletions
diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss
index adf0db990..cc9f0eb3b 100644
--- a/app/assets/stylesheets/components.scss
+++ b/app/assets/stylesheets/components.scss
@@ -405,3 +405,109 @@
     text-decoration: underline;
   }
 }
+
+.react-toggle {
+  display: inline-block;
+  position: relative;
+  cursor: pointer;
+  background-color: transparent;
+  border: 0;
+  padding: 0;
+  user-select: none;
+  -webkit-tap-highlight-color: rgba(0,0,0,0);
+  -webkit-tap-highlight-color: transparent;
+}
+
+.react-toggle-screenreader-only {
+  border: 0;
+  clip: rect(0 0 0 0);
+  height: 1px;
+  margin: -1px;
+  overflow: hidden;
+  padding: 0;
+  position: absolute;
+  width: 1px;
+}
+
+.react-toggle--disabled {
+  cursor: not-allowed;
+  opacity: 0.5;
+  transition: opacity 0.25s;
+}
+
+.react-toggle-track {
+  width: 50px;
+  height: 24px;
+  padding: 0;
+  border-radius: 30px;
+  background-color: #282c37;
+  transition: all 0.2s ease;
+}
+
+.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {
+  background-color: darken(#282c37, 10%);
+}
+
+.react-toggle--checked .react-toggle-track {
+  background-color: #2b90d9;
+}
+
+.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {
+  background-color: lighten(#2b90d9, 10%);
+}
+
+.react-toggle-track-check {
+  position: absolute;
+  width: 14px;
+  height: 10px;
+  top: 0px;
+  bottom: 0px;
+  margin-top: auto;
+  margin-bottom: auto;
+  line-height: 0;
+  left: 8px;
+  opacity: 0;
+  transition: opacity 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-track-check {
+  opacity: 1;
+  transition: opacity 0.25s ease;
+}
+
+.react-toggle-track-x {
+  position: absolute;
+  width: 10px;
+  height: 10px;
+  top: 0px;
+  bottom: 0px;
+  margin-top: auto;
+  margin-bottom: auto;
+  line-height: 0;
+  right: 10px;
+  opacity: 1;
+  transition: opacity 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-track-x {
+  opacity: 0;
+}
+
+.react-toggle-thumb {
+  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+  position: absolute;
+  top: 1px;
+  left: 1px;
+  width: 22px;
+  height: 22px;
+  border: 1px solid #282c37;
+  border-radius: 50%;
+  background-color: #FAFAFA;
+  box-sizing: border-box;
+  transition: all 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-thumb {
+  left: 27px;
+  border-color: #2b90d9;
+}