1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-11 14:48:46 +01:00
bitwarden-browser/src/scss/header.scss
2021-12-20 15:47:17 +01:00

173 lines
3.3 KiB
SCSS

.header {
-webkit-app-region: drag;
min-height: 44px;
max-height: 44px;
border-bottom: 1px solid #000000;
display: grid;
grid-template-columns: 25% 1fr 25%;
grid-column-gap: 5px;
justify-items: center;
align-items: center;
@include themify($themes) {
background-color: themed("headerBackgroundColor");
border-bottom-color: themed("headerBorderColor");
}
app-search {
grid-column-start: 2;
width: 100%;
}
app-account-switcher {
justify-self: end;
height: 100%;
}
.search {
padding: 0 7px;
width: 100%;
text-align: left;
position: relative;
.fa {
position: absolute;
top: 7px;
left: 15px;
@include themify($themes) {
color: themed("headerInputPlaceholderColor");
}
}
input {
width: 100%;
margin: 0;
border: none;
padding: 5px 10px 5px 30px;
border-radius: $border-radius;
@include themify($themes) {
background-color: themed("headerInputBackgroundColor");
color: themed("headerInputColor");
}
&:focus {
border-radius: $border-radius;
outline: none;
@include themify($themes) {
background-color: themed("headerInputBackgroundFocusColor");
}
}
&::-webkit-input-placeholder {
@include themify($themes) {
color: themed("headerInputPlaceholderColor");
}
}
}
}
}
.account-switcher {
display: grid;
grid-template-columns: auto 1fr auto;
grid-column-gap: 5px;
align-items: center;
justify-items: center;
padding: 0 10px;
height: 100%;
user-select: none;
@include themify($themes) {
color: themed("accountSwitcherTextColor");
}
img {
display: block;
}
span {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:hover {
@include themify($themes) {
background-color: themed("headerBorderColor");
color: themed("accountSwitcherTextColor");
}
}
}
.account-switcher-dropdown {
@include themify($themes) {
background-color: themed("accountSwitcherBackgroundColor");
}
margin-right: 5px;
margin-top: 1px; // Fix for border-bottom in header
width: 100%;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12),
0 1px 5px 0 rgba(0, 0, 0, 0.2);
border-radius: $border-radius;
a {
padding: 5px 10px;
display: block;
@include themify($themes) {
color: themed("textColor");
}
&:hover {
@include themify($themes) {
background-color: themed("backgroundColorAlt2");
}
}
}
.accounts {
padding: 4px 0;
.account {
display: grid;
grid-column-gap: 5px;
grid-template:
[row1-start] "email status" [row1-end]
[row2-start] "server server" [row2-end]
/ 1fr auto;
align-items: baseline;
.server {
font-size: $font-size-small;
}
.email {
font-size: $font-size-large;
}
.status {
font-style: italic;
grid-area: status;
}
}
}
.border {
@include themify($themes) {
background: themed("borderColor");
}
left: 10px;
width: calc(100% - 20px);
height: 1px;
position: relative;
}
.add {
margin: 4px 0;
}
}