Skip to content

Commit f6b2de9

Browse files
authored
Fix contrast in white-label header (#24446)
* Fix contrast for white-label header * Fix header background on login page * With puppeteer support * Update UI screenshots * Update UI screenshots
1 parent 6cca9f0 commit f6b2de9

23 files changed

Lines changed: 86 additions & 52 deletions
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

ā€Žplugins/CoreHome/stylesheets/layout.lessā€Ž

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,29 @@ ul.browser-default {
6868
ul.right.hide-on-med-and-down {
6969
margin-right: 4px;
7070

71+
.navbar-icon {
72+
padding: 8px;
73+
}
74+
.navbar-label {
75+
padding: 4px;
76+
}
77+
.navbar-label, .navbar-icon {
78+
position: relative;
79+
z-index: 1;
80+
border-radius: 8px;
81+
82+
/* Hover & active background */
83+
&::after {
84+
content: '';
85+
position: absolute;
86+
inset: 0;
87+
z-index: -1;
88+
border-radius: 8px;
89+
background: transparent;
90+
opacity: 0.051;
91+
}
92+
}
93+
7194
> li[role="menuitem"].active {
7295
background: transparent;
7396

@@ -77,7 +100,10 @@ ul.browser-default {
77100

78101
.navbar-icon,
79102
.navbar-label {
80-
background-color: @theme-color-background-tinyContrast;
103+
&::after {
104+
// contrast + opacity to create an effect that work in light and dark mode, with our without white-label customization
105+
background: @color-mode-black;
106+
}
81107
}
82108
}
83109

@@ -89,32 +115,29 @@ ul.browser-default {
89115
background: transparent;
90116
}
91117

92-
.navbar-icon {
93-
padding: 8px;
94-
}
95-
.navbar-label {
96-
padding: 4px;
97-
}
98-
.navbar-label, .navbar-icon {
99-
border-radius: 8px;
100-
}
101-
102118
&:hover .navbar-icon,
103119
&:hover .navbar-label,
104120
&:focus .navbar-icon,
105121
&:focus .navbar-label {
106-
background-color: @theme-color-background-tinyContrast;
122+
&::after {
123+
// contrast + opacity to create an effect that work in light and dark mode, with our without white-label customization
124+
background: light-dark(black, white);
125+
}
107126
}
108127
}
109128
}
110129

111130
.languageSelection {
112131
&:hover {
113-
background-color: @theme-color-background-tinyContrast;
132+
background-color: @color-mode-black;
114133
}
115134
}
116135

117136
ul:not(#mobile-top-menu) {
137+
a {
138+
color: @theme-color-header-text;
139+
}
140+
118141
.languageSelection {
119142
.title {
120143
color: @theme-color-header-text;
@@ -124,7 +147,6 @@ ul.browser-default {
124147
}
125148

126149
ul a {
127-
color: @theme-color-header-text;
128150
text-decoration: none;
129151
font-size: 14px;
130152
padding: 0 8px;
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

ā€Žplugins/Login/stylesheets/login.lessā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
***********************/
33
#loginPage {
44
nav {
5-
background-color: @color-white;
5+
background-color: @theme-color-header-background;
66
}
77
#logo {
88
padding-top: 6px;

ā€Žplugins/Morpheus/stylesheets/base.lessā€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* base.less is a standalone Less file */
2-
32
@import "base/colors";
43
@import "base/mixins";
4+
@import "base/mode-colors";
5+
56
/* General styles */
67
@import "general/_default.less";
78
@import "general/_utils.less";
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Mode color
2+
@color-mode-black: #000;
3+
@color-mode-white: #fff;
4+
5+
.inDarkMode({
6+
@color-mode-black: #fff;
7+
@color-mode-white: #000;
8+
});

0 commit comments

Comments
Ā (0)
⚔