mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
2.7 KiB
166 lines
2.7 KiB
//
|
|
// Header
|
|
//
|
|
|
|
._header {
|
|
position: absolute;
|
|
z-index: $headerZ;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: $headerHeight;
|
|
line-height: $headerHeight;
|
|
background: $headerBackground;
|
|
border-bottom: 1px solid $headerBorder;
|
|
@extend %user-select-none;
|
|
|
|
a:focus { outline: 0; }
|
|
}
|
|
|
|
//
|
|
// Navigation menu
|
|
//
|
|
|
|
._nav {
|
|
float: right;
|
|
margin-right: .5rem;
|
|
font-size: .875rem;
|
|
color: $textColor;
|
|
}
|
|
|
|
._nav-link,
|
|
._nav-link:hover {
|
|
position: relative;
|
|
float: left;
|
|
padding: 0 1.25rem;
|
|
color: inherit;
|
|
text-decoration: none;
|
|
|
|
@media #{$mediumScreen} { padding: 0 .75rem; }
|
|
}
|
|
|
|
._nav-link {
|
|
&:before, &:after {
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: 0;
|
|
width: 0;
|
|
height: 0;
|
|
margin-left: -.375rem;
|
|
border: .375rem solid transparent;
|
|
border-bottom-color: darken($headerBorder, 2%);
|
|
}
|
|
|
|
&:after {
|
|
bottom: -1px;
|
|
border-bottom-color: $contentBackground;
|
|
}
|
|
}
|
|
|
|
._nav-current {
|
|
&:before, &:after { content: ''; }
|
|
}
|
|
|
|
//
|
|
// Logo
|
|
//
|
|
|
|
._logo {
|
|
position: relative;
|
|
float: left;
|
|
height: $headerHeight;
|
|
margin: 0;
|
|
line-height: inherit;
|
|
font-size: inherit;
|
|
cursor: default;
|
|
|
|
> ._nav-link {
|
|
float: none;
|
|
margin-left: .75rem;
|
|
padding: 0 .25rem;
|
|
}
|
|
}
|
|
|
|
//
|
|
// Search form
|
|
//
|
|
|
|
._search {
|
|
position: relative;
|
|
float: left;
|
|
width: $sidebarWidth;
|
|
height: 100%;
|
|
padding: .5rem 0 .5rem .5rem;
|
|
@extend %border-box;
|
|
|
|
@media #{$mediumScreen} { width: $sidebarMediumWidth; }
|
|
|
|
&:before {
|
|
position: absolute;
|
|
top: 1rem;
|
|
left: 1rem;
|
|
opacity: .4;
|
|
@if $style == 'dark' {
|
|
@extend %icon, %icon-search-white;
|
|
} @else {
|
|
@extend %icon, %icon-search;
|
|
}
|
|
}
|
|
}
|
|
|
|
._search-input {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0 .75rem 1px 1.75rem;
|
|
font-size: .875rem;
|
|
background: $contentBackground;
|
|
border: 1px solid;
|
|
border-color: darken($headerBorder, 2%);
|
|
border-radius: 3px;
|
|
|
|
&:focus {
|
|
outline: 0;
|
|
@if $inputFocusBorder {
|
|
border-color: $inputFocusBorder;
|
|
box-shadow: 0 0 1px $inputFocusBorder;
|
|
}
|
|
}
|
|
|
|
&[disabled] {
|
|
background: $sidebarBackground;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
|
|
._search-clear {
|
|
display: none;
|
|
position: absolute;
|
|
top: .5em;
|
|
right: 0;
|
|
padding: .5em;
|
|
cursor: pointer;
|
|
opacity: .3;
|
|
|
|
&:hover { opacity: .5; }
|
|
@if $style == 'dark' {
|
|
&:before { @extend %icon, %icon-close-white; }
|
|
} @else {
|
|
&:before { @extend %icon, %icon-clear; }
|
|
}
|
|
._search-active > & { display: block; }
|
|
}
|
|
|
|
._search-tag {
|
|
display: none;
|
|
position: absolute;
|
|
top: .875rem;
|
|
left: .875rem;
|
|
padding: 0 .5rem;
|
|
line-height: 1.25rem;
|
|
font-size: .875rem;
|
|
color: $textColorLight;
|
|
background: darken($headerBackground, 5%);
|
|
border-radius: 2px;
|
|
}
|