diff options
author | Wicklow <wicklow@framasoft.org> | 2023-02-16 12:30:30 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-02-20 13:52:22 +0100 |
commit | 27f84cc3371aaf519c1bb5c0cca9e728a9dd3967 (patch) | |
tree | c45e780589ea69f0a9842c90af58e22fe32749f4 /client/src/sass/class-helpers/_forms.scss | |
parent | 6b13ba9b808059fec4398ee3b38c8197d8c41fb9 (diff) | |
download | PeerTube-27f84cc3371aaf519c1bb5c0cca9e728a9dd3967.tar.gz PeerTube-27f84cc3371aaf519c1bb5c0cca9e728a9dd3967.tar.zst PeerTube-27f84cc3371aaf519c1bb5c0cca9e728a9dd3967.zip |
Refactoring class helpers + add bootstrap mixins
Diffstat (limited to 'client/src/sass/class-helpers/_forms.scss')
-rw-r--r-- | client/src/sass/class-helpers/_forms.scss | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/client/src/sass/class-helpers/_forms.scss b/client/src/sass/class-helpers/_forms.scss new file mode 100644 index 000000000..79495aeb4 --- /dev/null +++ b/client/src/sass/class-helpers/_forms.scss | |||
@@ -0,0 +1,55 @@ | |||
1 | @use '_variables' as *; | ||
2 | @use '_mixins' as *; | ||
3 | |||
4 | .form-group { | ||
5 | margin-bottom: 1rem; | ||
6 | } | ||
7 | |||
8 | .input-error:not(:focus) { | ||
9 | |||
10 | &, | ||
11 | +.nav-preview, | ||
12 | // Markdown textarea | ||
13 | +*+.tab-content { | ||
14 | border-color: $red !important; | ||
15 | } | ||
16 | } | ||
17 | |||
18 | .input-group .input-error { | ||
19 | z-index: 3; | ||
20 | } | ||
21 | |||
22 | .form-error, | ||
23 | .form-warning { | ||
24 | display: block; | ||
25 | margin-top: 5px; | ||
26 | font-size: 0.9em; | ||
27 | } | ||
28 | |||
29 | .form-error { | ||
30 | color: $red; | ||
31 | } | ||
32 | |||
33 | // Disable red error on input focus | ||
34 | .input-error:focus, | ||
35 | .input-group:focus-within { | ||
36 | |||
37 | +.form-error, | ||
38 | +*+.form-error, | ||
39 | // Markdown textarea | ||
40 | +*+*+.form-error { | ||
41 | color: pvar(--mainForegroundColor); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | .form-group-description { | ||
46 | @include muted; | ||
47 | |||
48 | font-size: 14px; | ||
49 | margin-top: 10px; | ||
50 | } | ||
51 | |||
52 | label+.form-group-description { | ||
53 | margin-bottom: 10px; | ||
54 | margin-top: 0; | ||
55 | } \ No newline at end of file | ||