]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/sass/class-helpers.scss
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / sass / class-helpers.scss
1 @use '_variables' as *;
2 @use '_mixins' as *;
3 @use '_badges' as *;
4 @use '_icons' as *;
5
6 .link-orange {
7 color: pvar(--mainForegroundColor);
8 font-weight: $font-bold;
9 border-bottom: 0.19em solid pvar(--mainColor);
10 display: inline-block;
11 line-height: 1.2;
12
13 &:hover {
14 color: pvar(--mainForegroundColor);
15 opacity: 0.8;
16 }
17 }
18
19 .underline-orange {
20 display: inline-block;
21 border-bottom: 0.19em solid pvar(--mainColor);
22 }
23
24 // ---------------------------------------------------------------------------
25
26 .peertube-button {
27 @include peertube-button;
28 }
29
30 .peertube-button-link {
31 @include peertube-button-link;
32 }
33
34 .orange-button {
35 @include orange-button;
36 }
37
38 .orange-button-inverted {
39 @include orange-button-inverted;
40 }
41
42 .grey-button {
43 @include grey-button;
44 }
45
46 .tertiary-button {
47 @include tertiary-button;
48 }
49
50 .peertube-radio-container {
51 @include peertube-radio-container;
52 }
53
54 // ---------------------------------------------------------------------------
55
56 .muted {
57 color: pvar(--greyForegroundColor) !important;
58 }
59
60 // ---------------------------------------------------------------------------
61
62 .pt-badge {
63 @include peertube-badge;
64 }
65
66 // ---------------------------------------------------------------------------
67
68 .form-group {
69 margin-bottom: 1rem;
70 }
71
72 .input-error:not(:focus) {
73 border-color: $red !important;
74 }
75
76 .form-error,
77 .form-warning {
78 display: block;
79 margin-top: 5px;
80 }
81
82 .form-error {
83 color: $red;
84 }
85
86 .input-error:focus + .form-error {
87 color: pvar(--mainForegroundColor);
88 }
89
90 .form-group-description {
91 @extend .muted !optional;
92
93 font-size: 14px;
94 margin-top: 10px;
95 }
96
97 label + .form-group-description {
98 margin-bottom: 10px;
99 margin-top: 0;
100 }
101
102 // ---------------------------------------------------------------------------
103
104
105 .sub-menu-entry {
106 @include disable-default-a-behaviour;
107 @include margin-right(55px);
108
109 opacity: 0.7;
110 color: pvar(--mainForegroundColor);
111 display: inline-block;
112 font-weight: $font-semibold;
113 border-bottom: 2px solid transparent;
114 white-space: nowrap;
115 font-size: 1rem;
116
117 &.active {
118 border-bottom-color: pvar(--mainColor);
119 }
120
121 &:hover,
122 &:active,
123 &:focus {
124 color: pvar(--mainForegroundColor);
125 }
126
127 &.active,
128 &:hover,
129 &:active,
130 &:focus {
131 opacity: 1;
132 outline: 0 hidden !important;
133 }
134
135 @media screen and (max-width: $mobile-view) {
136 @include margin-left(15px);
137 }
138 }
139
140 .title-page-v2 {
141 font-weight: normal;
142 font-size: 15px;
143 padding: 35px 25px;
144 }
145
146 .title-page {
147 @include margin-right(55px);
148
149 margin-top: 30px;
150 margin-bottom: 25px;
151
152 color: pvar(--mainForegroundColor);
153 display: inline-block;
154 font-weight: $font-semibold;
155 font-size: 1.25rem;
156
157 a {
158 @include disable-default-a-behaviour;
159
160 color: inherit;
161
162 &:hover {
163 color: inherit;
164 opacity: 0.8;
165 }
166 }
167
168 @media screen and (max-width: $mobile-view) {
169 @include margin-left(15px);
170 }
171 }
172
173 .admin-sub-header {
174 display: flex;
175 align-items: center;
176 margin-bottom: 30px;
177
178 @media screen and (max-width: $small-view) {
179 flex-direction: column;
180 }
181 }
182
183 // ---------------------------------------------------------------------------
184
185 .no-results {
186 height: 40vh;
187 max-height: 500px;
188
189 display: flex;
190 flex-direction: column;
191 align-items: center;
192 justify-content: center;
193 font-weight: $font-semibold;
194 }
195
196 // ---------------------------------------------------------------------------
197
198 .chevron-down {
199 @include chevron-down(0.55rem, 0.15rem);
200
201 margin: 0 8px;
202 }
203
204 .chevron-up {
205 @include chevron-up(0.55rem, 0.15rem);
206
207 margin: 0 8px;
208 }
209
210 .chevron-right {
211 @include chevron-right(0.55rem, 0.15rem);
212
213 margin: 0 8px;
214 }
215
216 .chevron-left {
217 @include chevron-left(0.55rem, 0.15rem);
218
219 margin: 0 8px;
220 }
221
222 // ---------------------------------------------------------------------------
223
224 .callout {
225 padding: 1.25rem;
226 border: 1px solid #eee;
227 border-radius: .25rem;
228 position: relative;
229
230 > label {
231 position: relative;
232 top: -5px;
233 left: -10px;
234 color: #6c757d !important;
235 }
236
237 &:not(.callout-light) {
238 border-left-width: .25rem;
239 }
240
241 &.callout-orange {
242 border-color: pvar(--mainColorLightest);
243
244 &:not(.callout-light) {
245 border-left-color: pvar(--mainColor);
246 }
247 }
248 }
249
250 // ---------------------------------------------------------------------------
251
252 .anchor {
253 position: relative;
254 top: #{-($header-height + 20px)};
255 }
256
257 .offset-content { // if sub-menu fixed
258 .anchor {
259 top: #{-($header-height + $sub-menu-height + 20px)};
260 }
261 }
262
263 // ---------------------------------------------------------------------------
264
265 .alert {
266 &.pt-alert-primary {
267 background-color: pvar(--mainColorVeryLight);
268 border: 2px solid pvar(--mainColorLightest);
269 }
270 }