aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/sass/application.scss
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-07-23 15:09:15 +0200
committerGitHub <noreply@github.com>2020-07-23 15:09:15 +0200
commited5bb517266c80904c44bf44a335f1003f5aa277 (patch)
tree80671a21fb8c13ab47a65f01b64222a3a1e96a47 /client/src/sass/application.scss
parent345b4a22a8432cfd8c9c9f24634821d58c215b9a (diff)
downloadPeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.tar.gz
PeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.tar.zst
PeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.zip
Improve navigation sub-menu and tabs effects (#2971)
* Improve nav border and colors on active and non-active * Remove margin-top effect on active nav * Use opacity / bold instead of color change on nav * Remove dropdown items label in sub-menu and add a class active * Position sub-menu to fixed * Autoclose dropdown sub-menu only on outside click * Remove open dropdown on hover in sub-menu * Show reusable h1 for dropdown item in sub-menu * Put reusable sub-menu h1 styles to mixins * Add icons to sub-menu dropdown-item h1 * Make all the sub-menu accessible with focus Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/sass/application.scss')
-rw-r--r--client/src/sass/application.scss31
1 files changed, 19 insertions, 12 deletions
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss
index 5ca3b447a..c76e5db7b 100644
--- a/client/src/sass/application.scss
+++ b/client/src/sass/application.scss
@@ -139,12 +139,13 @@ label {
139 .sub-menu { 139 .sub-menu {
140 background-color: pvar(--submenuColor); 140 background-color: pvar(--submenuColor);
141 width: 100%; 141 width: 100%;
142 height: 81px; 142 height: $sub-menu-height;
143 margin-bottom: $sub-menu-margin-bottom;
144 display: flex; 143 display: flex;
145 align-items: center; 144 align-items: center;
146 padding-left: $not-expanded-horizontal-margins; 145 padding-left: $not-expanded-horizontal-margins;
147 padding-right: $not-expanded-horizontal-margins; 146 padding-right: $not-expanded-horizontal-margins;
147 position: fixed;
148 z-index: 1;
148 } 149 }
149 150
150 // Override some properties if the main content is expanded (no menu on the left) 151 // Override some properties if the main content is expanded (no menu on the left)
@@ -175,6 +176,7 @@ label {
175} 176}
176 177
177.title-page { 178.title-page {
179 opacity: 0.6;
178 color: pvar(--mainForegroundColor); 180 color: pvar(--mainForegroundColor);
179 font-size: 16px; 181 font-size: 16px;
180 display: inline-block; 182 display: inline-block;
@@ -182,14 +184,15 @@ label {
182 font-weight: $font-semibold; 184 font-weight: $font-semibold;
183 @include disable-default-a-behaviour; 185 @include disable-default-a-behaviour;
184 186
185 &.active, &.title-page-single { 187 border-bottom: 2px solid transparent;
188
189 &.title-page-single {
186 margin-top: 30px; 190 margin-top: 30px;
187 margin-bottom: 25px; 191 margin-bottom: 25px;
188 } 192 }
189 193
190 &.active { 194 &.active {
191 font-weight: $font-bold; 195 border-bottom-color: pvar(--mainColor);
192 border-bottom: 2px solid pvar(--mainColor);
193 } 196 }
194 197
195 &.title-page-single { 198 &.title-page-single {
@@ -200,6 +203,11 @@ label {
200 color: pvar(--mainForegroundColor); 203 color: pvar(--mainForegroundColor);
201 } 204 }
202 205
206 &.active, &:hover, &:active, &:focus, &.title-page-single {
207 opacity: 1;
208 outline: 0px hidden !important;
209 }
210
203 @media screen and (max-width: $mobile-view) { 211 @media screen and (max-width: $mobile-view) {
204 margin-right: 15px; 212 margin-right: 15px;
205 } 213 }
@@ -209,11 +217,6 @@ label {
209.title-page-settings { 217.title-page-settings {
210 white-space: nowrap; 218 white-space: nowrap;
211 font-size: 115%; 219 font-size: 115%;
212 font-weight: $font-regular;
213
214 &.active {
215 font-weight: $font-semibold;
216 }
217} 220}
218 221
219.admin-sub-header { 222.admin-sub-header {
@@ -232,11 +235,15 @@ label {
232 color: pvar(--mainForegroundColor); 235 color: pvar(--mainForegroundColor);
233 padding: 5px 15px; 236 padding: 5px 15px;
234 border-radius: 0.25rem; 237 border-radius: 0.25rem;
238 font-weight: $font-semibold;
239 opacity: 0.6;
235 240
236 &.active { 241 &.active {
237 font-weight: $font-semibold;
238 background-color: #f0f0f0; 242 background-color: #f0f0f0;
239 color: #000; 243 }
244
245 &.active, &:hover, &:active, &:focus {
246 opacity: 1;
240 } 247 }
241 } 248 }
242} 249}