Skip to content

Commit c10dd39

Browse files
committed
Fix contrast for white-label header
1 parent 8c71cf5 commit c10dd39

1 file changed

Lines changed: 34 additions & 13 deletions

File tree

plugins/CoreHome/stylesheets/layout.less

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,28 @@ 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+
&::after {
83+
content: '';
84+
position: absolute;
85+
inset: 0;
86+
z-index: -1;
87+
border-radius: 8px;
88+
background: transparent;
89+
opacity: 0.051;
90+
}
91+
}
92+
7193
> li[role="menuitem"].active {
7294
background: transparent;
7395

@@ -77,7 +99,10 @@ ul.browser-default {
7799

78100
.navbar-icon,
79101
.navbar-label {
80-
background-color: @theme-color-background-tinyContrast;
102+
&::after {
103+
// contrast + opacity to create an effect that work in light and dark mode, with our without white-label customization
104+
background: light-dark(black, white);
105+
}
81106
}
82107
}
83108

@@ -89,21 +114,14 @@ ul.browser-default {
89114
background: transparent;
90115
}
91116

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-
102117
&:hover .navbar-icon,
103118
&:hover .navbar-label,
104119
&:focus .navbar-icon,
105120
&:focus .navbar-label {
106-
background-color: @theme-color-background-tinyContrast;
121+
&::after {
122+
// contrast + opacity to create an effect that work in light and dark mode, with our without white-label customization
123+
background: light-dark(black, white);
124+
}
107125
}
108126
}
109127
}
@@ -115,6 +133,10 @@ ul.browser-default {
115133
}
116134

117135
ul:not(#mobile-top-menu) {
136+
a {
137+
color: @theme-color-header-text;
138+
}
139+
118140
.languageSelection {
119141
.title {
120142
color: @theme-color-header-text;
@@ -124,7 +146,6 @@ ul.browser-default {
124146
}
125147

126148
ul a {
127-
color: @theme-color-header-text;
128149
text-decoration: none;
129150
font-size: 14px;
130151
padding: 0 8px;

0 commit comments

Comments
 (0)