diff options
Diffstat (limited to 'webPage/style.css')
-rw-r--r-- | webPage/style.css | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/webPage/style.css b/webPage/style.css new file mode 100644 index 0000000..63663d5 --- /dev/null +++ b/webPage/style.css @@ -0,0 +1,148 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-size: 1rem; + font-weight: normal; + line-height: 1.5; + background-color: #222; +} + +/* SWITCH */ + .switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; +} + +.switch input {display:none;} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked + .slider { + background-color: #2196F3; +} + +input:focus + .slider { + box-shadow: 0 0 1px #2196F3; +} + +input:checked + .slider:before { + -webkit-transform: translateX(26px); + -ms-transform: translateX(26px); + transform: translateX(26px); +} + +.slider.round { + border-radius: 34px; +} + +.slider.round:before { + border-radius: 50%; +} +/* ./SWITCH */ + +.toggle-button { + position: relative; + display: inline-block; + color: #fff; +} + + .toggle-button label { + display: inline-block; + text-transform: uppercase; + cursor: pointer; + text-align: left; +} + +.toggle-button input { + display: none; +} + + .toggle-button__icon { + cursor: pointer; + pointer-events: none; +} + +.toggle-button__icon:before, .toggle-button__icon:after { + content: ""; + position: absolute; + top: 45%; + left: 35%; + transition: 0.2s ease-out; +} + +.toggle-button--tuli label { + line-height: 20px; + text-indent: 30px; +} + +.toggle-button--tuli input[type=checkbox]:checked ~ .toggle-button__icon { + background: #fff; +} + +.toggle-button--tuli input[type=checkbox]:checked ~ .toggle-button__icon:before, .toggle-button--tuli input[type=checkbox]:checked ~ .toggle-button__icon:after { + opacity: 1; +} + +.toggle-button--tuli .toggle-button__icon { + position: absolute; + top: 0; + left: 0; + width: 20px; + height: 20px; + transition: all 0.2s; + border: 2px solid #fff; + border-radius: 1px; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); +} + +.toggle-button--tuli .toggle-button__icon:before, .toggle-button--tuli .toggle-button__icon:after { + top: 5px; + left: 2px; + width: 12px; + height: 2px; + border-radius: 3px; + background: #fff; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); + top: 35%; + background: #61B136; + opacity: 0; + transform-origin: left center; +} + +.toggle-button--tuli .toggle-button__icon:before { + transform: translate(0, 0) rotate(45deg) scale(0.6, 1); +} + +.toggle-button--tuli .toggle-button__icon:after { + transform: translate(4px, 6px) rotate(-45deg); +} + +.toggle-button--tuli:hover input[type=checkbox]:not(:checked) ~ .toggle-button__icon { + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} |