]>
Commit | Line | Data |
---|---|---|
63c4db6d C |
1 | @import '_variables'; |
2 | ||
26c6ee80 | 3 | @mixin disable-default-a-behaviour { |
cadb46d8 | 4 | &:hover, &:focus, &:active { |
26c6ee80 C |
5 | text-decoration: none !important; |
6 | outline: none !important; | |
7 | } | |
8 | } | |
c30745f3 C |
9 | |
10 | @mixin peertube-input-text($width) { | |
11 | display: inline-block; | |
12 | height: $button-height; | |
13 | width: $width; | |
14 | background: #fff; | |
15 | border: 1px solid #C6C6C6; | |
16 | border-radius: 3px; | |
17 | padding-left: 15px; | |
15ca2e87 | 18 | padding-right: 15px; |
c30745f3 C |
19 | |
20 | &::placeholder { | |
21 | color: #585858; | |
22 | } | |
23 | } | |
24 | ||
7b272fd7 | 25 | @mixin orange-button { |
15a7387d C |
26 | &, &:active, &:focus { |
27 | color: #fff; | |
28 | background-color: $orange-color; | |
29 | } | |
7b272fd7 | 30 | |
15a7387d | 31 | &:hover { |
0727cab0 | 32 | color: #fff; |
7b272fd7 C |
33 | background-color: $orange-hoover-color; |
34 | } | |
4cc66133 C |
35 | |
36 | &[disabled], &.disabled { | |
37 | cursor: default; | |
cadb46d8 C |
38 | color: #fff; |
39 | background-color: #C6C6C6; | |
4cc66133 | 40 | } |
7b272fd7 C |
41 | } |
42 | ||
43 | @mixin grey-button { | |
15a7387d C |
44 | &, &:active, &:focus { |
45 | background-color: $grey-color; | |
46 | color: #585858; | |
47 | } | |
7b272fd7 | 48 | |
4cc66133 | 49 | &:hover, &:active, &:focus, &[disabled], &.disabled { |
0727cab0 | 50 | color: #585858; |
7b272fd7 C |
51 | background-color: $grey-hoover-color; |
52 | } | |
4cc66133 C |
53 | |
54 | &[disabled], &.disabled { | |
55 | cursor: default; | |
56 | } | |
7b272fd7 C |
57 | } |
58 | ||
c30745f3 C |
59 | @mixin peertube-button { |
60 | border: none; | |
c30745f3 C |
61 | font-weight: $font-semibold; |
62 | font-size: 15px; | |
63 | height: $button-height; | |
64 | line-height: $button-height; | |
65 | border-radius: 3px; | |
66 | text-align: center; | |
c30745f3 C |
67 | padding: 0 17px 0 13px; |
68 | cursor: pointer; | |
e600e1fe | 69 | outline: 0; |
c30745f3 C |
70 | } |
71 | ||
72 | @mixin peertube-button-link { | |
73 | display: inline-block; | |
74 | ||
c30745f3 | 75 | @include disable-default-a-behaviour; |
ce0e281d | 76 | @include peertube-button; |
c30745f3 | 77 | } |
2295ce6c C |
78 | |
79 | @mixin avatar ($size) { | |
80 | width: $size; | |
81 | height: $size; | |
82 | } | |
0727cab0 C |
83 | |
84 | @mixin icon ($size) { | |
85 | display: inline-block; | |
86 | background-repeat: no-repeat; | |
87 | background-size: contain; | |
88 | width: $size; | |
89 | height: $size; | |
90 | vertical-align: middle; | |
91 | cursor: pointer; | |
92 | } | |
4cc66133 C |
93 | |
94 | ||
15a7387d C |
95 | @mixin peertube-select-container ($width) { |
96 | padding: 0; | |
97 | margin: 0; | |
4cc66133 | 98 | border: 1px solid #C6C6C6; |
4cc66133 C |
99 | width: $width; |
100 | border-radius: 3px; | |
15a7387d C |
101 | overflow: hidden; |
102 | background: #fff; | |
103 | position: relative; | |
104 | ||
105 | &:after { | |
106 | top: 50%; | |
107 | right: calc(0% + 15px); | |
108 | content: " "; | |
109 | height: 0; | |
110 | width: 0; | |
111 | position: absolute; | |
112 | pointer-events: none; | |
113 | border: 5px solid rgba(0, 0, 0, 0); | |
114 | border-top-color: #000000; | |
115 | margin-top: -2px; | |
116 | z-index: 100; | |
117 | } | |
118 | ||
119 | select { | |
120 | padding: 0 12px; | |
121 | width: calc(100% + 2px); | |
122 | position: relative; | |
123 | left: 1px; | |
124 | border: none; | |
125 | box-shadow: none; | |
126 | background: transparent none; | |
127 | appearance: none; | |
128 | cursor: pointer; | |
129 | height: $button-height; | |
130 | ||
131 | &:focus { | |
132 | outline: none; | |
133 | } | |
134 | ||
135 | &:-moz-focusring { | |
136 | color: transparent; | |
137 | text-shadow: 0 0 0 #000; | |
138 | } | |
139 | } | |
140 | } | |
141 | ||
142 | @mixin peertube-select-disabled-container ($width) { | |
143 | @include peertube-select-container($width); | |
144 | ||
145 | background-color: #E5E5E5; | |
146 | ||
147 | select { | |
148 | cursor: default; | |
149 | } | |
4cc66133 | 150 | } |
a0d69908 C |
151 | |
152 | @mixin peertube-checkbox ($border-width) { | |
153 | display: none; | |
154 | ||
155 | & + label { | |
156 | position: relative; | |
157 | width: 18px; | |
158 | height: 18px; | |
159 | border: $border-width solid #000; | |
160 | border-radius: 3px; | |
161 | vertical-align: middle; | |
162 | cursor: pointer; | |
163 | ||
164 | &:after { | |
165 | content: ''; | |
166 | position: absolute; | |
167 | top: calc(2px - #{$border-width}); | |
168 | left: 5px; | |
169 | width: 5px; | |
170 | height: 12px; | |
171 | opacity: 0; | |
172 | transform: rotate(45deg) scale(0); | |
173 | border-right: 2px solid #fff; | |
174 | border-bottom: 2px solid #fff; | |
175 | } | |
176 | } | |
177 | ||
178 | &:checked + label { | |
179 | border-color: transparent; | |
180 | background: $orange-color; | |
181 | animation: jelly 0.6s ease; | |
182 | ||
183 | &:after { | |
184 | opacity: 1; | |
185 | transform: rotate(45deg) scale(1); | |
186 | } | |
187 | } | |
188 | ||
189 | & + label + label { | |
190 | font-size: 15px; | |
191 | font-weight: $font-regular; | |
192 | margin-left: 5px; | |
193 | cursor: pointer; | |
194 | } | |
195 | } | |
196 |