mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-25 14:01:44 -04:00
* fix: improve RWD challege grid accessibility * fix: change wording from challenge to step * fix: improve keyboard focus indicator on step links * fix: style jump link as button * fix: accessible background color for completed steps * refactor: make steps a nav region * refactor: remove duplicate selector * fix: enhance focus indicator on jump link * fix: TS type * refactor: remove unneeded CSS * chore: resolve conflict * chore: translate accessible name on nav * fix: remove h4 from button * fix: add course name to toggle button * fix: improve accessibility of course stats on toggle button * fix: prefix step links with sr-only "Step" * fix: add start project button * refactor: remove unnecessary spaces * fix: clean up styles * Update client/src/templates/Introduction/intro.css Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
470 lines
7.6 KiB
CSS
470 lines
7.6 KiB
CSS
.super-block-intro-page p {
|
|
font-family: 'Lato', sans-serif;
|
|
font-size: 1.17rem;
|
|
}
|
|
|
|
.super-block-intro-page .alert p {
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
}
|
|
|
|
.big-subheading {
|
|
font-size: 2rem;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.block-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.block-header .big-block-title {
|
|
flex-grow: 3;
|
|
flex-basis: 0;
|
|
padding: 25px 15px 10px;
|
|
}
|
|
|
|
.big-block-title:hover,
|
|
.big-block-title:focus,
|
|
.big-block-title:active {
|
|
background-color: var(--primary-background);
|
|
}
|
|
|
|
a.cert-tag:hover,
|
|
a.cert-tag:focus,
|
|
a.cert-tag:active {
|
|
color: var(--highlight-background);
|
|
background-color: var(--highlight-color);
|
|
}
|
|
|
|
.big-block-title {
|
|
font-size: 1.5rem;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.block-grid-title {
|
|
margin: 0;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.block-grid .challenge-jump-link {
|
|
margin: 0 25px 25px;
|
|
}
|
|
|
|
.block-grid .challenge-jump-link a:focus {
|
|
outline: 3px solid var(--blue-mid);
|
|
outline-offset: 0;
|
|
}
|
|
|
|
.block-grid .challenge-jump-link a:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
.block-title-translation-cta {
|
|
white-space: nowrap;
|
|
padding: 0.2em 0.5em;
|
|
color: var(--highlight-color);
|
|
background-color: var(--highlight-background);
|
|
}
|
|
|
|
.block-title-translation-cta:hover,
|
|
.block-title-translation-cta:focus {
|
|
text-decoration: none;
|
|
padding: 0.2em 0.5em;
|
|
color: var(--highlight-background);
|
|
background-color: var(--highlight-color);
|
|
}
|
|
|
|
.block-cta-wrapper {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
padding: 25px 15px 10px 0;
|
|
margin: 0 0 0.6rem;
|
|
flex-grow: 2;
|
|
flex-basis: 0;
|
|
font-size: 0.8rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.course-title {
|
|
font-size: 1.13rem;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.block-description pre {
|
|
display: inline;
|
|
padding: 0;
|
|
}
|
|
|
|
.superBlock-image {
|
|
max-width: 100%;
|
|
height: auto !important;
|
|
}
|
|
|
|
.block-ui {
|
|
height: 100%;
|
|
list-style: none;
|
|
color: var(--secondary-color);
|
|
padding: 0;
|
|
}
|
|
|
|
.block-ui a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.map-title {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 18px 0;
|
|
background: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
width: 100%;
|
|
}
|
|
|
|
button.map-title {
|
|
cursor: pointer;
|
|
padding: 18px 15px;
|
|
}
|
|
|
|
.map-title:hover {
|
|
color: var(--tertiary-color);
|
|
background-color: var(--tertiary-background);
|
|
}
|
|
|
|
.map-challenge-wrap > a,
|
|
.map-project-wrap > a {
|
|
display: flex;
|
|
}
|
|
|
|
.map-project-wrap > a {
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.map-project-checkmark {
|
|
margin-right: 7px;
|
|
padding-left: 15px;
|
|
}
|
|
|
|
.block .map-cert-title {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 18px 8px;
|
|
background: var(--secondary-background);
|
|
border: none;
|
|
text-align: left;
|
|
width: 100%;
|
|
}
|
|
|
|
.block .no-cursor {
|
|
cursor: default;
|
|
}
|
|
|
|
.block .no-cursor h3 {
|
|
cursor: text;
|
|
}
|
|
|
|
.block .map-is-cert:hover {
|
|
color: var(--tertiary-color);
|
|
background-color: var(--tertiary-background);
|
|
}
|
|
|
|
.block-ui .block {
|
|
background: var(--primary-background);
|
|
}
|
|
|
|
.block-ui .block .block-description {
|
|
padding: 0 15px 15px;
|
|
border-bottom: 3px solid var(--secondary-background);
|
|
}
|
|
|
|
.map-cert-title > h3 {
|
|
font-size: 1.17rem;
|
|
margin: 0 0 0 15px;
|
|
}
|
|
|
|
.map-cert-title > svg {
|
|
display: inline-block;
|
|
height: 40px;
|
|
width: auto;
|
|
min-width: 25px;
|
|
}
|
|
|
|
.map-title > h4 {
|
|
margin: 0;
|
|
}
|
|
|
|
.map-title-completed {
|
|
margin-left: auto;
|
|
min-width: 100px;
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.map-title-completed-big {
|
|
margin-left: auto;
|
|
padding-right: 15px;
|
|
padding-left: 20px;
|
|
position: relative;
|
|
top: 4px;
|
|
}
|
|
|
|
.map-title svg {
|
|
width: 14px;
|
|
margin-right: 10px;
|
|
flex-shrink: 0;
|
|
fill: var(--color-quaternary) !important;
|
|
stroke: var(--color-quaternary);
|
|
}
|
|
|
|
.open > .map-title > svg:first-child {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.block-grid .map-title > svg:last-child {
|
|
transform: rotate(180deg);
|
|
margin-left: auto;
|
|
}
|
|
|
|
.block-grid.open .map-title > svg:last-child {
|
|
transform: rotate(0deg);
|
|
}
|
|
|
|
.map-challenges-ul {
|
|
padding-inline-start: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.map-challenge-title {
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
font-size: 1.13rem;
|
|
}
|
|
|
|
.map-challenge-title a {
|
|
width: 100%;
|
|
padding: 10px 15px;
|
|
align-items: center;
|
|
}
|
|
|
|
.map-challenges-grid .map-challenge-title a {
|
|
width: 3.4rem;
|
|
height: 2.75rem;
|
|
min-width: 24px;
|
|
min-height: 24px;
|
|
padding: 0;
|
|
}
|
|
|
|
.map-challenges-grid .map-challenge-title a:focus {
|
|
outline: 3px solid var(--secondary-color);
|
|
outline-offset: -3px;
|
|
}
|
|
|
|
.map-challenges-grid .map-challenge-title a:focus:not(:focus-visible) {
|
|
outline: none;
|
|
}
|
|
|
|
.map-challenges-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-top: 1rem;
|
|
}
|
|
.map-challenge-title-grid {
|
|
flex: 0 1 60px;
|
|
}
|
|
.map-challenges-grid .map-project-wrap {
|
|
flex: 1 1 100px;
|
|
}
|
|
.map-challenge-title-grid a.map-grid-item {
|
|
margin: 5px 0;
|
|
justify-content: center;
|
|
}
|
|
|
|
.block-description {
|
|
padding: 18px 0;
|
|
}
|
|
|
|
.block-description > p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.challenge-completed {
|
|
background: var(--highlight-background);
|
|
position: relative;
|
|
}
|
|
|
|
.challenge-completed span {
|
|
font-weight: 700;
|
|
font-size: 1.3rem;
|
|
margin-top: -0.05rem;
|
|
}
|
|
|
|
@media screen and (max-width: 500px) {
|
|
.super-block-intro-page p {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.big-subheading {
|
|
font-size: 1.35rem;
|
|
}
|
|
|
|
.big-block-title {
|
|
font-size: 1.17rem;
|
|
}
|
|
|
|
.block-header {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.block-cta-wrapper {
|
|
padding: 25px 15px 10px;
|
|
}
|
|
|
|
.course-title,
|
|
.map-cert-title,
|
|
.map-challenge-title {
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 767px) {
|
|
.intro-layout-container {
|
|
padding: 0 10px;
|
|
}
|
|
|
|
button.map-title {
|
|
width: 100%;
|
|
}
|
|
|
|
.map-challenge-title {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.map-title-completed {
|
|
flex-shrink: 0;
|
|
padding-left: 15px;
|
|
}
|
|
}
|
|
|
|
.intro-layout {
|
|
margin-top: 1.45rem;
|
|
}
|
|
|
|
.intro-layout p,
|
|
.intro-layout li {
|
|
font-family: 'Lato', sans-serif;
|
|
}
|
|
|
|
.intro-toc .list-group-item {
|
|
margin: 5px auto;
|
|
}
|
|
|
|
.intro-toc .list-group-item:hover {
|
|
background-color: var(--secondary-background);
|
|
}
|
|
|
|
.intro-toc a:hover {
|
|
text-decoration: none;
|
|
text-decoration-style: none;
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.cert-tag {
|
|
text-align: left;
|
|
width: fit-content;
|
|
font-size: 1rem;
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
margin-right: 5px;
|
|
padding: 4px 10px;
|
|
color: var(--highlight-color);
|
|
background-color: var(--highlight-background);
|
|
}
|
|
|
|
.block-grid {
|
|
border-bottom: 4px solid var(--secondary-background);
|
|
}
|
|
|
|
.block-grid .block-header {
|
|
flex-direction: column;
|
|
display: flex;
|
|
background: transparent;
|
|
border: none;
|
|
text-align: left;
|
|
width: 100%;
|
|
cursor: pointer;
|
|
padding: 18px 15px;
|
|
}
|
|
|
|
.block-grid .block-header:hover {
|
|
color: var(--tertiary-color);
|
|
background-color: var(--tertiary-background);
|
|
}
|
|
|
|
.block-grid .block-header[aria-expanded='true'] {
|
|
border-bottom: 2px solid var(--secondary-background);
|
|
}
|
|
|
|
.block-header-button-text {
|
|
align-items: center;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.block-grid .block-header .block-link {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.block-ui .block-grid .block-description {
|
|
border: none;
|
|
padding: 25px;
|
|
}
|
|
|
|
.block-grid .map-title > svg {
|
|
margin: 10px;
|
|
}
|
|
|
|
.title-wrapper {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.block-grid .progress-wrapper {
|
|
width: 100%;
|
|
text-align: left;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: 18px;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.block-grid .progress-wrapper span {
|
|
color: var(--quaternary-color);
|
|
}
|
|
|
|
.block-grid .progress {
|
|
height: 15px;
|
|
background-color: var(--secondary-background);
|
|
margin: 0 10px;
|
|
width: 80%;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.block-grid .progress-bar {
|
|
background-color: var(--blue-mid);
|
|
}
|
|
|
|
.tags-wrapper {
|
|
display: flex;
|
|
width: 100%;
|
|
}
|
|
|
|
.grid-project-block {
|
|
margin-bottom: 50px;
|
|
}
|