mwcpl
Version:
Master's Web Component Pattern Library
80 lines (69 loc) • 1.48 kB
CSS
:host {
display: block;
width: 100%;
}
:host([spacer]) {
margin-top: auto;
}
a {
display: flex;
align-items: center;
height: 3rem;
text-decoration: none;
color: var(--mwcpl-navbar-item-color, #000000);
background-color: var(--mwcpl-navbar-background-color, #ffffff);
transition: all 100ms ease;
}
a:hover {
color: var(--mwcpl-navbar-item-color-hover, #5262bc);
background-color: var(--mwcpl-navbar-item-background-color-hover, #f5f5f5);
}
.label {
display: none;
white-space: nowrap;
}
slot[name=icon]::slotted(*) {
font-size: 1.5rem;
flex-shrink: 0;
margin: 0 1.5rem;
width: 2rem;
display: flex ;
justify-content: center;
}
:host([header]) {
pointer-events: none;
background-color: var(--mwcpl-navbar-item-header-background-color, #f5f5f5);
}
:host([header]) .label {
font-weight: bold;
font-size: 1.2rem;
}
:host([iconless]) slot[name=icon]::slotted(*) {
display: none ;
}
:host([iconless]) .label {
margin-left: 1.5rem;
}
@media only screen and (min-width: 600px) {
:host([open]) .label {
display: inline;
}
}
@media only screen and (max-width: 599px) {
:host([header]) {
display: none;
}
:host([spacer]) {
margin-top: unset;
}
:host([open]) .label {
display: none;
}
a {
justify-content: center;
}
}
:host([active]) a {
color: var(--mwcpl-navbar-item-color-active, #3f51b5);
background-color: var(--mwcpl-navbar-item-background-color-active, #f5f5f5);
}