mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 11:11:28 -05:00
509 lines
9.8 KiB
CSS
509 lines
9.8 KiB
CSS
:root {
|
|
--theme-color: #0a0a23;
|
|
--yellow-gold: #ffbf00;
|
|
--gray-00: #ffffff;
|
|
--gray-05: #f5f6f7;
|
|
--gray-10: #dfdfe2;
|
|
--gray-15: #d0d0d5;
|
|
--gray-45: #858591;
|
|
--gray-75: #3b3b4f;
|
|
--gray-80: #2a2a40;
|
|
--gray-85: #1b1b32;
|
|
--gray-90: #0a0a23;
|
|
--purple-light: #dbb8ff;
|
|
--purple-dark: #5a01a7;
|
|
--yellow-light: #ffc300;
|
|
--yellow-dark: #4d3800;
|
|
--blue-light: rgb(153, 201, 255);
|
|
--blue-light-translucent: rgba(153, 201, 255, 0.3);
|
|
--blue-dark: rgb(0, 46, 173);
|
|
--blue-dark-translucent: rgba(0, 46, 173, 0.3);
|
|
--green-light: #acd157;
|
|
--blue-mid: #198eee;
|
|
--purple-mid: #9400d3;
|
|
--green-dark: #00471b;
|
|
--red-light: #ffadad;
|
|
--red-dark: #850000;
|
|
--love-light: #f8577c;
|
|
--love-dark: #f82153;
|
|
--editor-background-light: #fffffe;
|
|
--editor-background-dark: #2a2b40;
|
|
--focus-outline-color: var(--blue-mid);
|
|
--font-family-sans-serif: 'Lato', sans-serif;
|
|
--font-family-monospace: 'Hack-ZeroSlash', monospace;
|
|
|
|
--size: 1.5rem;
|
|
--line-height: 2rem;
|
|
}
|
|
|
|
.light {
|
|
--primary-color: var(--gray-90);
|
|
--secondary-color: var(--gray-85);
|
|
--tertiary-color: var(--gray-80);
|
|
--quaternary-color: var(--gray-75);
|
|
--quaternary-background: var(--gray-15);
|
|
--tertiary-background: var(--gray-10);
|
|
--secondary-background: var(--gray-05);
|
|
--primary-background: var(--gray-00);
|
|
--highlight-color: var(--blue-dark);
|
|
--highlight-background: var(--blue-light);
|
|
--selection-color: var(--blue-dark-translucent);
|
|
--success-color: var(--green-dark);
|
|
--success-background: var(--green-light);
|
|
--danger-color: var(--red-dark);
|
|
--danger-background: var(--red-light);
|
|
--love-color: var(--love-dark);
|
|
--editor-background: var(--editor-background-light);
|
|
}
|
|
|
|
.dark {
|
|
--primary-color: var(--gray-00);
|
|
--secondary-color: var(--gray-05);
|
|
--tertiary-color: var(--gray-10);
|
|
--quaternary-color: var(--gray-15);
|
|
--quaternary-background: var(--gray-75);
|
|
--tertiary-background: var(--gray-80);
|
|
--secondary-background: var(--gray-85);
|
|
--primary-background: var(--gray-90);
|
|
--highlight-color: var(--blue-light);
|
|
--highlight-background: var(--blue-dark);
|
|
--selection-color: var(--blue-light-translucent);
|
|
--success-color: var(--green-light);
|
|
--success-background: var(--green-dark);
|
|
--danger-color: var(--red-light);
|
|
--danger-background: var(--red-dark);
|
|
--love-color: var(--love-light);
|
|
--editor-background: var(--editor-background-dark);
|
|
}
|
|
|
|
body {
|
|
font-size: 100%;
|
|
line-height: 2.3em;
|
|
background: var(--secondary-background);
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
* {
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
body .content {
|
|
max-width: 80%;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
/****** Nav ****/
|
|
|
|
.universal-nav {
|
|
margin: 0;
|
|
width: 100vw;
|
|
height: 38px;
|
|
background-color: var(--theme-color);
|
|
position: fixed;
|
|
top: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
}
|
|
|
|
.universal-nav a.translations-link {
|
|
color: var(--gray-00);
|
|
position: fixed;
|
|
right: 50px;
|
|
line-height: 24px;
|
|
font-size: 16px;
|
|
margin: 6px 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.universal-nav img {
|
|
margin: 7px 0;
|
|
height: 24px;
|
|
}
|
|
|
|
.app-nav {
|
|
visibility: hidden;
|
|
}
|
|
|
|
@media screen and (max-width: 768px) {
|
|
.universal-nav a.translations-link {
|
|
visibility: hidden;
|
|
}
|
|
|
|
body .content {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
.theme-toggle {
|
|
background-color: var(--tertiary-background);
|
|
position: fixed;
|
|
left: 10px;
|
|
line-height: 24px;
|
|
font-size: 16px;
|
|
margin: 2px 0;
|
|
padding: 4px;
|
|
}
|
|
|
|
/****** Cover Page ******/
|
|
|
|
section.cover {
|
|
padding-bottom: 112px;
|
|
height: auto;
|
|
min-height: 100vh;
|
|
background: var(--secondary-background) !important;
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
section.cover .cover-main {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
margin: 0;
|
|
padding: 32px 8px 0;
|
|
}
|
|
|
|
section.cover h1 {
|
|
font-weight: bold;
|
|
font-size: 2.3rem;
|
|
margin: 2em 0;
|
|
}
|
|
|
|
section.cover span {
|
|
background-color: var(--secondary-background);
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
section.cover a {
|
|
text-decoration: none;
|
|
border-bottom: 0.01rem solid var(--secondary-color);
|
|
color: var(--secondary-color);
|
|
background-color: var(--secondary-background);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
section.cover a:hover {
|
|
background-color: var(--tertiary-background);
|
|
color: var(--tertiary-color);
|
|
border: none;
|
|
}
|
|
|
|
section.cover a.anchor {
|
|
border: none;
|
|
}
|
|
|
|
.cover-icon {
|
|
margin-right: 0.75em;
|
|
}
|
|
|
|
section.cover ul {
|
|
font-size: var(--size);
|
|
line-height: var(--line-height);
|
|
display: grid;
|
|
text-align: left;
|
|
grid-column-gap: 16px;
|
|
grid-row-gap: 20px;
|
|
list-style: none;
|
|
max-width: unset;
|
|
margin: 1.5em 0;
|
|
}
|
|
|
|
section.cover .cover-main > p:last-child a:last-child {
|
|
font-size: var(--size);
|
|
line-height: var(--line-height);
|
|
background-color: var(--quaternary-background);
|
|
color: var(--secondary-color);
|
|
border-radius: 0;
|
|
border: 3px solid var(--secondary-color);
|
|
}
|
|
|
|
section.cover .cover-main > p:last-child a:last-child:hover {
|
|
font-size: var(--size);
|
|
line-height: var(--line-height);
|
|
background-color: var(--secondary-color);
|
|
color: var(--secondary-background);
|
|
opacity: 1;
|
|
}
|
|
|
|
section.cover.show ~ .sidebar,
|
|
section.cover.show ~ .sidebar-toggle {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 850px) {
|
|
section.cover ul {
|
|
grid-template-columns: 100%;
|
|
padding: 0;
|
|
}
|
|
|
|
section.cover ul li {
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 450px) {
|
|
section.cover ul li {
|
|
white-space: normal;
|
|
}
|
|
|
|
.cover-main .buttons a {
|
|
width: 100%;
|
|
margin: 0.2rem 0;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 400px) {
|
|
section.cover .cover-main > p:last-child a:last-child {
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
margin-right: 0;
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
/****** Sidebar ******/
|
|
|
|
.sidebar {
|
|
background-color: var(--primary-background);
|
|
color: var(--quaternary-color);
|
|
padding: 0;
|
|
}
|
|
|
|
.sidebar ul li a,
|
|
.search a {
|
|
color: var(--quaternary-color);
|
|
}
|
|
|
|
.sidebar ul li > a:hover,
|
|
.search a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.sidebar .search .clear-button {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.sidebar ul li.active > a {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
/****** Sidebar Toggle ******/
|
|
|
|
.sidebar-toggle,
|
|
.sidebar,
|
|
.content {
|
|
margin-top: 38px;
|
|
}
|
|
|
|
.sidebar-toggle {
|
|
cursor: pointer;
|
|
}
|
|
|
|
body .sidebar-toggle {
|
|
background: none;
|
|
top: var(--size);
|
|
left: calc(300px + 1.5rem);
|
|
cursor: pointer;
|
|
width: var(--size);
|
|
height: var(--size);
|
|
padding: 0;
|
|
transition: left 0.25s ease-out;
|
|
}
|
|
|
|
body .sidebar-toggle span {
|
|
background-color: var(--secondary-color);
|
|
height: 0.2rem;
|
|
width: var(--size);
|
|
position: absolute;
|
|
left: 0;
|
|
margin: 0;
|
|
transform-origin: 0;
|
|
border-radius: 1px;
|
|
}
|
|
|
|
body.close .sidebar-toggle {
|
|
transition: left 0.25s ease-out;
|
|
background-color: var(--secondary-background);
|
|
width: var(--size);
|
|
height: var(--size);
|
|
left: var(--size);
|
|
}
|
|
|
|
body.close .sidebar-toggle span {
|
|
transform-origin: center;
|
|
}
|
|
|
|
body .sidebar-toggle span:nth-child(1) {
|
|
top: 0;
|
|
}
|
|
body .sidebar-toggle span:nth-child(2) {
|
|
top: 0.5rem;
|
|
}
|
|
body .sidebar-toggle span:nth-child(3) {
|
|
top: 1rem;
|
|
}
|
|
|
|
.sidebar-toggle:hover {
|
|
opacity: 0.8;
|
|
}
|
|
.sidebar-toggle .sidebar-toggle-button:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
@media screen and (max-width: 768px) {
|
|
body .sidebar-toggle {
|
|
left: 1rem;
|
|
}
|
|
body.close .sidebar-toggle {
|
|
left: calc(300px + 1.5rem);
|
|
}
|
|
}
|
|
|
|
body.close .app-nav,
|
|
body.close .github-corner {
|
|
display: block !important;
|
|
text-align: center;
|
|
}
|
|
|
|
/****** Markdown General ******/
|
|
|
|
/* Undo vue.css defaults */
|
|
.anchor span {
|
|
all: unset;
|
|
}
|
|
|
|
.markdown-section h1,
|
|
.markdown-section h2 {
|
|
margin: 1em 0;
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.markdown-section p {
|
|
font-size: 18px;
|
|
line-height: 28px;
|
|
}
|
|
|
|
.markdown-section code {
|
|
background-color: var(--quaternary-background);
|
|
color: var(--quaternary-color);
|
|
padding: 0.05em 0.15em 0.15em;
|
|
margin: 0.05em;
|
|
font-size: 16px;
|
|
line-height: 24px;
|
|
}
|
|
|
|
.markdown-section a {
|
|
text-decoration: none;
|
|
color: var(--secondary-color);
|
|
border-bottom: 0.1rem solid var(--secondary-color);
|
|
}
|
|
|
|
.markdown-section a:hover {
|
|
background-color: var(--tertiary-background);
|
|
border: none;
|
|
}
|
|
|
|
.markdown-section a.anchor {
|
|
border: none;
|
|
}
|
|
|
|
.markdown-section strong {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.markdown-section pre {
|
|
background-color: var(--primary-background);
|
|
}
|
|
.markdown-section pre > code {
|
|
background-color: var(--primary-background);
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.markdown-section a > code,
|
|
.markdown-section a > strong > code {
|
|
background-color: var(--primary-color);
|
|
color: var(--tertiary-background);
|
|
padding: 0.05em 0.15em 0;
|
|
margin: 0.05em;
|
|
}
|
|
|
|
.markdown-section a > code:hover,
|
|
.markdown-section a > code:active,
|
|
.markdown-section a > strong > code:hover,
|
|
.markdown-section a > strong > code:active {
|
|
background-color: #525252;
|
|
color: #f8f8f8;
|
|
padding: 0.05em 0.15em 0;
|
|
margin: 0.05em;
|
|
}
|
|
|
|
.markdown-section em,
|
|
.markdown-section blockquote {
|
|
color: var(--tertiary-color);
|
|
}
|
|
|
|
.markdown-section tr:nth-child(2n) {
|
|
background-color: var(--tertiary-background);
|
|
}
|
|
|
|
@media screen and (max-width: 768px) {
|
|
.markdown-section {
|
|
max-width: 90%;
|
|
padding: 40px 15px;
|
|
}
|
|
}
|
|
|
|
/****** CODE HIGHLIGHTING ******/
|
|
|
|
.token.punctuation {
|
|
color: var(--yellow-gold);
|
|
}
|
|
|
|
.token.attr-value {
|
|
color: var(--blue-mid);
|
|
}
|
|
|
|
.token.string {
|
|
color: var(--love-dark);
|
|
}
|
|
|
|
/****** COPY TO CLIPBOARD ******/
|
|
|
|
.docsify-copy-code-button {
|
|
font-size: 0.7em !important;
|
|
}
|
|
|
|
/****** Others ******/
|
|
|
|
.search input {
|
|
background-color: var(--secondary-background);
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.search .search-keyword {
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.i18n-lang-list ul {
|
|
height: 10em;
|
|
font-size: larger;
|
|
list-style: none;
|
|
display: -webkit-flex;
|
|
display: flex;
|
|
-webkit-align-items: center;
|
|
align-items: center;
|
|
-webkit-justify-content: center;
|
|
justify-content: center;
|
|
-webkit-flex-flow: column wrap;
|
|
flex-flow: column wrap;
|
|
-webkit-align-content: stretch;
|
|
align-content: stretch;
|
|
}
|
|
|
|
.i18n-lang-list li {
|
|
text-align: left;
|
|
width: 10em;
|
|
}
|