mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-24 20:00:39 -04:00
595 lines
12 KiB
CSS
595 lines
12 KiB
CSS
.universal-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
font-size: 18px;
|
|
font-family: 'Lato', sans-serif;
|
|
height: var(--header-height);
|
|
background: var(--theme-color);
|
|
position: fixed;
|
|
z-index: 1000;
|
|
color: var(--gray-00);
|
|
width: 100%;
|
|
padding: 0 15px;
|
|
top: 0;
|
|
}
|
|
|
|
.universal-nav a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.universal-nav-left {
|
|
display: flex;
|
|
flex: 1 0 33%;
|
|
margin-left: 0;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.universal-nav-middle {
|
|
display: flex;
|
|
align-items: center;
|
|
flex: 1 0 33%;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
-webkit-overflow-scrolling: touch;
|
|
letter-spacing: 0.4px;
|
|
white-space: nowrap;
|
|
-ms-overflow-scrolling: touch;
|
|
}
|
|
|
|
.universal-nav-right {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
flex: 1 0 33%;
|
|
height: var(--header-height);
|
|
}
|
|
|
|
#universal-nav-logo {
|
|
flex-shrink: 0;
|
|
display: block;
|
|
margin: 0 auto;
|
|
color: var(--gray-00);
|
|
font-size: 1.7rem;
|
|
line-height: 1em;
|
|
font-weight: bold;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
#universal-nav-logo:hover {
|
|
text-decoration: none;
|
|
background-color: var(--theme-color);
|
|
}
|
|
|
|
#universal-nav-logo:focus {
|
|
background-color: inherit;
|
|
}
|
|
|
|
#universal-nav-logo svg {
|
|
display: block;
|
|
width: auto;
|
|
height: 24px;
|
|
margin: 7px 0;
|
|
}
|
|
|
|
.nav-list {
|
|
display: none;
|
|
position: absolute;
|
|
background-color: var(--theme-color);
|
|
top: calc(var(--header-height) * 2);
|
|
right: 0;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-end;
|
|
width: 100vw;
|
|
height: auto;
|
|
margin: 0 0 0 -12px;
|
|
padding: 0;
|
|
list-style: none;
|
|
max-width: 15rem;
|
|
}
|
|
|
|
.nav-list li {
|
|
width: 100%;
|
|
height: 2.2rem;
|
|
}
|
|
|
|
.nav-link {
|
|
margin: 0;
|
|
padding: 2px 15px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--gray-00);
|
|
background-color: var(--gray-90);
|
|
opacity: 1;
|
|
white-space: normal;
|
|
min-height: var(--header-height);
|
|
width: 100%;
|
|
border: none;
|
|
height: 100%;
|
|
}
|
|
|
|
.nav-lang {
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.nav-link:focus {
|
|
outline: 3px solid var(--blue-mid);
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
.nav-link:focus:not(:focus-visible) {
|
|
background-color: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
.nav-link:not([aria-disabled='true']):hover {
|
|
color: var(--theme-color) !important;
|
|
text-decoration: none;
|
|
background-color: var(--gray-10) !important;
|
|
cursor: pointer;
|
|
outline: none !important;
|
|
}
|
|
|
|
.nav-link-header,
|
|
.nav-link-header:not([aria-disabled='true']):hover,
|
|
.nav-link-header:active {
|
|
color: var(--gray-00);
|
|
background-color: var(--gray-90);
|
|
cursor: default;
|
|
}
|
|
|
|
.nav-link .fa-external-link-alt {
|
|
color: var(--gray-45);
|
|
}
|
|
|
|
.nav-link .fa-check,
|
|
.nav-link .fa-check-square {
|
|
width: 18px !important;
|
|
height: auto !important;
|
|
}
|
|
|
|
.nav-link:hover .nav-lang-menu,
|
|
.nav-link:active .nav-lang-menu {
|
|
background-color: var(--gray-00);
|
|
color: var(--gray-90);
|
|
cursor: pointer;
|
|
}
|
|
|
|
button.nav-link:focus {
|
|
color: var(--tertiary-color);
|
|
background-color: var(--tertiary-background);
|
|
outline: 3px solid var(--blue-mid);
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
button.nav-link:focus:not(:focus-visible) {
|
|
background-color: inherit;
|
|
color: #fff;
|
|
outline: none;
|
|
}
|
|
|
|
button.nav-link:not([aria-disabled='true']):hover {
|
|
background-color: var(--gray-10);
|
|
color: var(--theme-color);
|
|
}
|
|
|
|
button.nav-link[aria-disabled='true'] {
|
|
cursor: default;
|
|
background-color: inherit;
|
|
}
|
|
|
|
.display-menu .theme-disabled {
|
|
height: 4.2rem;
|
|
}
|
|
|
|
.nav-link-header label {
|
|
font-weight: normal;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.nav-lang-menu {
|
|
display: none;
|
|
padding: 0;
|
|
color: var(--gray-90);
|
|
background-color: var(--gray-80);
|
|
width: 100%;
|
|
position: absolute;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
list-style-type: none;
|
|
margin: 0;
|
|
border: 2px solid var(--gray-90);
|
|
border-top: 0;
|
|
border-bottom: 0;
|
|
top: 0;
|
|
overflow-y: auto;
|
|
scrollbar-width: auto;
|
|
/* lang menu should always be full height */
|
|
height: 19.9rem;
|
|
}
|
|
|
|
/* main menu must be at least as tall as lang menu (when displayed)
|
|
unless there isn't enough view port height */
|
|
.nav-list.display-lang-menu {
|
|
min-height: min(19.9rem, calc(100vh - var(--header-height)));
|
|
}
|
|
|
|
.nav-lang-menu > button:hover {
|
|
background-image: none !important;
|
|
}
|
|
|
|
.nav-lang-menu .nav-link {
|
|
color: #fff;
|
|
background-color: inherit;
|
|
padding-top: 0;
|
|
}
|
|
|
|
.nav-lang-menu .nav-link:focus {
|
|
color: #000;
|
|
background-color: var(--gray-10);
|
|
outline: none;
|
|
}
|
|
|
|
.nav-lang-menu .nav-link:focus:not(:focus-visible) {
|
|
background-color: inherit;
|
|
}
|
|
|
|
.nav-lang-menu .nav-link:hover {
|
|
background-color: var(--gray-10) !important;
|
|
}
|
|
|
|
.nav-lang-button {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
background-image: none;
|
|
}
|
|
|
|
.nav-lang-button:hover svg,
|
|
.nav-lang-button:focus {
|
|
fill: var(--gray-10);
|
|
}
|
|
|
|
.nav-lang-button:focus:not(:focus-visible) {
|
|
fill: revert;
|
|
}
|
|
|
|
.nav-lang-button[aria-expanded='true'] + .nav-lang-menu {
|
|
display: block;
|
|
}
|
|
|
|
.nav-lang-button svg {
|
|
height: 1rem;
|
|
width: 1rem;
|
|
}
|
|
|
|
.dark-palette .nav-lang-button:focus {
|
|
fill: revert;
|
|
}
|
|
|
|
.nav-lang-menu-option[aria-current='true'] {
|
|
/* check mark for current language */
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16'%3E%3Cg fill='white'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06a.733.733 0 0 1 1.047 0l3.052 3.093l5.4-6.425a.247.247 0 0 1 .02-.022z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
|
background-size: 1.2rem;
|
|
background-position: calc(100% - 10px) center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
.nav-lang-menu-option[aria-current='true']:focus {
|
|
/* check mark for current language */
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16'%3E%3Cg fill='currentColor'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06a.733.733 0 0 1 1.047 0l3.052 3.093l5.4-6.425a.247.247 0 0 1 .02-.022z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
|
}
|
|
|
|
.nav-lang-menu-option[aria-current='true']:focus:not(:focus-visible) {
|
|
/* check mark for current language */
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16'%3E%3Cg fill='white'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06a.733.733 0 0 1 1.047 0l3.052 3.093l5.4-6.425a.247.247 0 0 1 .02-.022z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
|
}
|
|
|
|
.nav-lang-menu-option[aria-current='true']:hover {
|
|
/* check mark for current language */
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16'%3E%3Cg fill='currentColor'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06a.733.733 0 0 1 1.047 0l3.052 3.093l5.4-6.425a.247.247 0 0 1 .02-.022z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E") !important;
|
|
}
|
|
|
|
.nav-link-flex {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.nav-link-sign-in {
|
|
display: none;
|
|
}
|
|
|
|
.nav-link-dull {
|
|
color: var(--gray-45);
|
|
}
|
|
|
|
.nav-skeleton {
|
|
height: var(--header-height);
|
|
margin-right: 15px;
|
|
width: 350px;
|
|
}
|
|
|
|
.nav-list .fcc-loader {
|
|
padding: 0 40px;
|
|
margin-left: 35px;
|
|
margin-right: 25px;
|
|
}
|
|
|
|
.toggle-button-nav {
|
|
padding: 2px 14px;
|
|
border: 1px solid var(--gray-00);
|
|
font-family: 'lato', sans-serif;
|
|
font-size: 18px;
|
|
color: var(--gray-00);
|
|
background-color: var(--theme-color);
|
|
cursor: pointer;
|
|
max-height: calc(var(--header-height) - 8px);
|
|
margin-right: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.toggle-button-nav:hover {
|
|
background-color: var(--theme-color);
|
|
color: var(--gray-00);
|
|
border: 1px solid var(--gray-00);
|
|
}
|
|
|
|
.toggle-button-nav:focus {
|
|
outline: 3px solid var(--blue-mid);
|
|
outline-offset: 0;
|
|
}
|
|
|
|
.toggle-button-nav:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
.avatar-nav-link {
|
|
display: block;
|
|
height: 31px;
|
|
width: 31px;
|
|
}
|
|
|
|
.avatar-nav-link:hover,
|
|
.avatar-nav-link:focus {
|
|
background-color: var(--theme-color);
|
|
}
|
|
|
|
.avatar-nav-link .avatar-container {
|
|
height: 100%;
|
|
}
|
|
|
|
.avatar-nav-link .avatar-container svg,
|
|
.avatar-nav-link .avatar-container img {
|
|
height: 100%;
|
|
object-fit: cover;
|
|
width: 100%;
|
|
}
|
|
|
|
.gold-border {
|
|
border: 2px solid var(--yellow-gold);
|
|
}
|
|
|
|
.blue-border {
|
|
border: 2px solid var(--blue-mid);
|
|
}
|
|
|
|
.purple-border {
|
|
border: 2px solid var(--purple-mid);
|
|
}
|
|
|
|
.default-border {
|
|
border: 2px solid var(--gray-15);
|
|
}
|
|
|
|
.expand-nav {
|
|
height: var(--header-height);
|
|
}
|
|
|
|
.display-menu {
|
|
display: inherit;
|
|
text-align: left;
|
|
margin-top: calc(-1 * var(--header-height));
|
|
max-height: calc(100vh - var(--header-height));
|
|
overflow-y: scroll;
|
|
-ms-overflow-style: none;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.expand-lang-menu .display-menu {
|
|
overflow-y: unset;
|
|
}
|
|
|
|
.display-menu::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.reverse-toggle-color {
|
|
background-color: var(--gray-00);
|
|
color: var(--theme-color);
|
|
}
|
|
|
|
.reverse-toggle-color:hover {
|
|
background-color: var(--gray-00);
|
|
color: var(--theme-color);
|
|
}
|
|
|
|
.nav-line {
|
|
border-top: 0.1rem solid var(--gray-45);
|
|
}
|
|
|
|
.nav-line-2 {
|
|
border-color: var(--gray-45);
|
|
width: 100%;
|
|
margin: 0;
|
|
border-top-width: 2px;
|
|
}
|
|
|
|
.signup-btn {
|
|
max-height: calc(var(--header-height) - 6px);
|
|
padding: 4px 12px;
|
|
margin-left: 2px;
|
|
font-family: 'Roboto Mono', monospace !important;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar .ais-SearchBox-form {
|
|
width: 100vw;
|
|
height: 38px;
|
|
max-width: unset;
|
|
padding: 0 15px;
|
|
left: 0;
|
|
}
|
|
|
|
/* In mobile layout, prevent search input from hanging around if the
|
|
menu is collapsed. */
|
|
.universal-nav-right
|
|
#toggle-button-nav[aria-expanded='false']
|
|
+ .fcc_searchBar
|
|
.ais-SearchBox-form {
|
|
display: none;
|
|
}
|
|
|
|
/* In mobile layout, prevent search results from hanging around if the
|
|
menu is collapsed. */
|
|
.universal-nav-right
|
|
#toggle-button-nav[aria-expanded='false']
|
|
+ .fcc_searchBar
|
|
.ais-Hits {
|
|
display: none;
|
|
}
|
|
|
|
.universal-nav-right .ais-SearchBox-input {
|
|
width: calc(100vw - 17rem);
|
|
padding-left: 27px;
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar .ais-Hits {
|
|
width: calc(100vw - 17rem);
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar .ais-SearchBox-submit {
|
|
top: unset;
|
|
margin-top: 19px;
|
|
left: 18px;
|
|
}
|
|
|
|
.ais-SearchBox-input:focus {
|
|
outline: 3px solid var(--blue-mid);
|
|
}
|
|
|
|
.ais-SearchBox-submit:focus {
|
|
outline: 3px solid var(--blue-mid);
|
|
}
|
|
|
|
.ais-SearchBox-submit:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
@media (max-width: 980px) {
|
|
.universal-nav-middle {
|
|
flex: none;
|
|
}
|
|
|
|
.display-search {
|
|
display: initial;
|
|
}
|
|
|
|
.universal-nav-right {
|
|
flex: 1 0 50%;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.fcc_searchBar .ais-SearchBox-form {
|
|
display: flex;
|
|
position: absolute;
|
|
top: var(--header-height);
|
|
left: 15px;
|
|
max-width: calc(100vw - 350px);
|
|
}
|
|
|
|
#universal-nav-logo {
|
|
display: flex;
|
|
position: absolute;
|
|
left: 17px;
|
|
top: 0;
|
|
}
|
|
|
|
.expand-nav {
|
|
min-height: calc(2 * var(--header-height));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.nav-list {
|
|
min-width: 100%;
|
|
top: calc(var(--header-height) * 2);
|
|
margin-top: 0;
|
|
}
|
|
|
|
.fcc_searchBar,
|
|
.fcc_searchBar div {
|
|
width: 100%;
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar .ais-SearchBox-form {
|
|
width: 100%;
|
|
}
|
|
|
|
.display-menu {
|
|
max-height: calc(100vh - var(--header-height) * 2);
|
|
}
|
|
|
|
.universal-nav-right .ais-SearchBox-input {
|
|
width: calc(100vw - 30px);
|
|
}
|
|
|
|
.universal-nav-right .fcc_searchBar .ais-Hits {
|
|
width: calc(100% - 30px);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 455px) {
|
|
.universal-nav {
|
|
padding: 0 5px;
|
|
}
|
|
|
|
.universal-nav {
|
|
padding: 0 5px;
|
|
}
|
|
|
|
.nav-link-sign-in {
|
|
display: flex;
|
|
}
|
|
|
|
.navatar .signup-btn {
|
|
display: none;
|
|
}
|
|
|
|
.navatar {
|
|
display: none;
|
|
}
|
|
|
|
#universal-nav-logo {
|
|
max-width: 60%;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 300px) {
|
|
#universal-nav-logo {
|
|
max-width: none;
|
|
left: -170px;
|
|
}
|
|
}
|