holakit
Version:
Yet another design-driven UI component set.
110 lines (100 loc) • 2.35 kB
CSS
.hola-navbar {
height: 5rem;
}
.hola-navbar-white {
background: #fff;
margin-bottom: 2rem;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
}
.hola-navbar-transparent {
margin-bottom: -5rem;
}
.hola-navbar nav,
.hola-navbar-toggle-label {
display: inline-block;
line-height: 5rem;
overflow-x: auto;
white-space: nowrap;
max-width: 100%;
}
.hola-navbar nav.hola-navbar-sub,
.hola-navbar-toggle-label {
float: right;
}
.hola-navbar a {
display: inline-block;
font-size: 1.2rem;
text-decoration: none;
transition: 0.3s color ease;
}
.hola-navbar nav.hola-navbar-main a {
padding-right: 1em;
}
.hola-navbar nav.hola-navbar-sub a,
.hola-navbar-toggle-label {
padding-left: 1em;
}
.hola-navbar.hola-navbar-darkbg a,
.hola-navbar.hola-navbar-darkbg .hola-navbar-toggle-label::before {
color: rgba(255, 255, 255, 0.6);
}
.hola-navbar.hola-navbar-darkbg a:hover,
.hola-navbar.hola-navbar-darkbg a:active {
color: rgba(255, 255, 255, 0.9);
}
.hola-navbar.hola-navbar-lightbg a,
.hola-navbar.hola-navbar-lightbg .hola-navbar-toggle-label::before {
color: rgba(0, 0, 0, 0.6);
}
.hola-navbar.hola-navbar-lightbg a:hover,
.hola-navbar.hola-navbar-lightbg a:active {
color: rgba(0, 0, 0, 0.9);
}
.hola-navbar nav .hola-navbar-brand {
font-weight: bold;
}
.hola-navbar-toggle {
position: fixed;
left: -9999em; /* Make sure that this toggle is available to screen readers. */
}
.hola-navbar-toggle-label {
display: none;
}
.hola-navbar-toggle-label::before {
content: "☰";
font-size: 2em;
}
@media (max-width: 700px) {
.hola-navbar-toggle-label {
display: inline;
}
.hola-navbar nav.hola-navbar-sub {
position: fixed;
display: block;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
padding: 7rem 2rem;
color: var(--hola-text-dark-color);
z-index: 990;
background: var(--hola-backdrop-color);
transform: scaleY(0);
transform-origin: top;
transition: 0.3s transform ease;
}
.hola-navbar-toggle:checked ~ .hola-navbar-toggle-label::before {
position: fixed;
content: "✕";
color: var(--hola-text-light-color);
right: 1em;
z-index: 999;
}
.hola-navbar-toggle:checked ~ nav.hola-navbar-sub {
transform: scaleY(1);
}
.hola-navbar nav.hola-navbar-sub a {
color: var(--hola-text-light-color);
display: block;
}
}