diff options
Diffstat (limited to 'client/src/sass/class-helpers.scss')
-rw-r--r-- | client/src/sass/class-helpers.scss | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/client/src/sass/class-helpers.scss b/client/src/sass/class-helpers.scss new file mode 100644 index 000000000..45d45e0f8 --- /dev/null +++ b/client/src/sass/class-helpers.scss | |||
@@ -0,0 +1,212 @@ | |||
1 | @use '_variables' as *; | ||
2 | @use '_mixins' as *; | ||
3 | @use '_badges' as *; | ||
4 | @use '_icons' as *; | ||
5 | |||
6 | .peertube-button { | ||
7 | @include peertube-button; | ||
8 | } | ||
9 | |||
10 | .peertube-button-link { | ||
11 | @include peertube-button-link; | ||
12 | } | ||
13 | |||
14 | .orange-button { | ||
15 | @include orange-button; | ||
16 | } | ||
17 | |||
18 | .orange-button-inverted { | ||
19 | @include orange-button-inverted; | ||
20 | } | ||
21 | |||
22 | .grey-button { | ||
23 | @include grey-button; | ||
24 | } | ||
25 | |||
26 | .tertiary-button { | ||
27 | @include tertiary-button; | ||
28 | } | ||
29 | |||
30 | .peertube-radio-container { | ||
31 | @include peertube-radio-container; | ||
32 | } | ||
33 | |||
34 | // --------------------------------------------------------------------------- | ||
35 | |||
36 | .muted { | ||
37 | color: pvar(--greyForegroundColor) !important; | ||
38 | } | ||
39 | |||
40 | // --------------------------------------------------------------------------- | ||
41 | |||
42 | .pt-badge { | ||
43 | @include peertube-badge; | ||
44 | } | ||
45 | |||
46 | // --------------------------------------------------------------------------- | ||
47 | |||
48 | .form-group { | ||
49 | margin-bottom: 1rem; | ||
50 | } | ||
51 | |||
52 | .form-error, | ||
53 | .form-warning { | ||
54 | display: block; | ||
55 | margin-top: 5px; | ||
56 | } | ||
57 | |||
58 | .form-error { | ||
59 | color: $red; | ||
60 | } | ||
61 | |||
62 | .input-error { | ||
63 | border-color: $red !important; | ||
64 | } | ||
65 | |||
66 | .form-group-description { | ||
67 | @extend .muted !optional; | ||
68 | |||
69 | font-size: 90%; | ||
70 | margin-top: 10px; | ||
71 | } | ||
72 | |||
73 | // --------------------------------------------------------------------------- | ||
74 | |||
75 | |||
76 | .title-page { | ||
77 | @include disable-default-a-behaviour; | ||
78 | @include margin-right(55px); | ||
79 | |||
80 | opacity: 0.6; | ||
81 | color: pvar(--mainForegroundColor); | ||
82 | font-size: 16px; | ||
83 | display: inline-block; | ||
84 | font-weight: $font-semibold; | ||
85 | border-bottom: 2px solid transparent; | ||
86 | |||
87 | &.title-page-single { | ||
88 | margin-top: 30px; | ||
89 | margin-bottom: 25px; | ||
90 | } | ||
91 | |||
92 | &.active { | ||
93 | border-bottom-color: pvar(--mainColor); | ||
94 | } | ||
95 | |||
96 | &.title-page-single { | ||
97 | font-size: 125%; | ||
98 | } | ||
99 | |||
100 | &:hover, | ||
101 | &:active, | ||
102 | &:focus { | ||
103 | color: pvar(--mainForegroundColor); | ||
104 | } | ||
105 | |||
106 | &.active, | ||
107 | &:hover, | ||
108 | &:active, | ||
109 | &:focus, | ||
110 | &.title-page-single { | ||
111 | opacity: 1; | ||
112 | outline: 0 hidden !important; | ||
113 | } | ||
114 | |||
115 | @media screen and (max-width: $mobile-view) { | ||
116 | @include margin-left(15px); | ||
117 | } | ||
118 | } | ||
119 | |||
120 | .title-page-about, | ||
121 | .title-page-settings { | ||
122 | white-space: nowrap; | ||
123 | font-size: 115%; | ||
124 | } | ||
125 | |||
126 | .admin-sub-header { | ||
127 | display: flex; | ||
128 | align-items: center; | ||
129 | margin-bottom: 30px; | ||
130 | |||
131 | @media screen and (max-width: $small-view) { | ||
132 | flex-direction: column; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | // --------------------------------------------------------------------------- | ||
137 | |||
138 | .no-results { | ||
139 | height: 40vh; | ||
140 | max-height: 500px; | ||
141 | |||
142 | display: flex; | ||
143 | flex-direction: column; | ||
144 | align-items: center; | ||
145 | justify-content: center; | ||
146 | font-size: 16px; | ||
147 | font-weight: $font-semibold; | ||
148 | } | ||
149 | |||
150 | // --------------------------------------------------------------------------- | ||
151 | |||
152 | .chevron-down { | ||
153 | @include chevron-down(0.55rem, 0.15rem); | ||
154 | |||
155 | margin: 0 8px; | ||
156 | } | ||
157 | |||
158 | .chevron-up { | ||
159 | @include chevron-up(0.55rem, 0.15rem); | ||
160 | |||
161 | margin: 0 8px; | ||
162 | } | ||
163 | |||
164 | .chevron-right { | ||
165 | @include chevron-right(0.55rem, 0.15rem); | ||
166 | |||
167 | margin: 0 8px; | ||
168 | } | ||
169 | |||
170 | .chevron-left { | ||
171 | @include chevron-left(0.55rem, 0.15rem); | ||
172 | |||
173 | margin: 0 8px; | ||
174 | } | ||
175 | |||
176 | // --------------------------------------------------------------------------- | ||
177 | |||
178 | .callout { | ||
179 | padding: 1.25rem; | ||
180 | border: 1px solid #eee; | ||
181 | border-radius: .25rem; | ||
182 | position: relative; | ||
183 | |||
184 | > label { | ||
185 | position: relative; | ||
186 | top: -5px; | ||
187 | left: -10px; | ||
188 | color: #6c757d !important; | ||
189 | } | ||
190 | |||
191 | &:not(.callout-light) { | ||
192 | border-left-width: .25rem; | ||
193 | } | ||
194 | |||
195 | &.callout-info { | ||
196 | border-color: pvar(--mainColorLightest); | ||
197 | border-left-color: pvar(--mainColor); | ||
198 | } | ||
199 | } | ||
200 | |||
201 | // --------------------------------------------------------------------------- | ||
202 | |||
203 | .anchor { | ||
204 | position: relative; | ||
205 | top: #{-($header-height + 20px)}; | ||
206 | } | ||
207 | |||
208 | .offset-content { // if sub-menu fixed | ||
209 | .anchor { | ||
210 | top: #{-($header-height + $sub-menu-height + 20px)}; | ||
211 | } | ||
212 | } | ||