aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/input-switch.component.scss
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-19 11:12:01 +0100
committerChocobozzz <me@florianbigard.com>2020-11-19 15:25:41 +0100
commit4f926722ea6784ea389013378fd233f59077ec8a (patch)
tree36e92da1d8fc9394e1e36144f206e0427b7c02c3 /client/src/app/shared/shared-forms/input-switch.component.scss
parentfce7fe04eed39e23e76717085e92118e963def81 (diff)
downloadPeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.gz
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.zst
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.zip
Upgrade client dependencies
Migrate removed primeng theme to custom CSS
Diffstat (limited to 'client/src/app/shared/shared-forms/input-switch.component.scss')
-rw-r--r--client/src/app/shared/shared-forms/input-switch.component.scss44
1 files changed, 44 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-forms/input-switch.component.scss b/client/src/app/shared/shared-forms/input-switch.component.scss
new file mode 100644
index 000000000..c14950bd7
--- /dev/null
+++ b/client/src/app/shared/shared-forms/input-switch.component.scss
@@ -0,0 +1,44 @@
1@import '_variables';
2@import '_mixins';
3
4input {
5 position: absolute;
6 visibility: hidden;
7
8 & + label {
9 cursor: pointer;
10 text-indent: -9999px;
11 width: 35px;
12 height: 20px;
13 background: #cccccc;
14 display: block;
15 border-radius: 100px;
16 position: relative;
17 margin: 0;
18
19 &:after {
20 content: '';
21 position: absolute;
22 top: 3px;
23 left: 3px;
24 width: 14px;
25 height: 14px;
26 background: pvar(--mainBackgroundColor);
27 border-radius: 50%;
28 transition: 0.3s ease-out;
29 }
30
31 &:active:after {
32 width: 40px;
33 }
34 }
35
36 &:checked + label {
37 background: pvar(--mainColor);
38
39 &:after {
40 left: calc(100% - 3px);
41 transform: translateX(-100%);
42 }
43 }
44}