frontend-mentor/results-summary-component/style.css

228 lines
5 KiB
CSS
Raw Normal View History

@import 'modern-normalize';
2023-05-23 20:55:58 -07:00
@font-face {
font-family: 'Hanken Grotesk';
src: url('./assets/fonts/HankenGrotesk-VariableFont_wght.ttf') format('truetype-variations');
font-weight: 500 800;
2023-05-23 20:25:52 -07:00
}
2023-05-23 20:55:58 -07:00
:root {
--c-red: hsl(0, 100%, 67%);
2023-05-24 08:50:09 -07:00
--c-red-t: hsl(0, 100%, 67%, 0.1);
2023-05-23 20:55:58 -07:00
--c-yellow: hsl(39, 100%, 56%);
2023-05-24 08:50:09 -07:00
--c-yellow-t: hsl(39, 100%, 56%, 0.1);
2023-05-23 20:55:58 -07:00
--c-green: hsl(166, 100%, 37%);
2023-05-24 08:50:09 -07:00
--c-green-t: hsl(166, 100%, 37%, 0.1);
2023-05-23 20:55:58 -07:00
--c-blue: hsl(234, 85%, 45%);
2023-05-24 08:50:09 -07:00
--c-blue-t: hsl(234, 85%, 45%, 0.1);
2023-05-23 20:25:52 -07:00
2023-05-23 20:55:58 -07:00
--c-bg-main-start: hsl(252, 100%, 67%);
--c-bg-main-end: hsl(241, 81%, 54%);
--c-bg-bubble-start: hsla(256, 72%, 46%, 1);
--c-bg-bubble-end: hsla(241, 72%, 46%, 0);
2023-05-23 20:25:52 -07:00
2023-05-23 20:55:58 -07:00
--c-n-white: hsl(0, 0%, 100%);
--c-n-white-t: hsl(0, 0%, 100%, 0.7);
--c-n-white-xt: hsl(0, 0%, 100%, 0.4);
2023-05-23 20:55:58 -07:00
--c-n-pale-blue: hsl(221, 100%, 96%);
--c-n-lavender: hsl(241, 100%, 89%);
--c-n-gray-blue: hsl(224, 30%, 27%);
2023-05-24 08:50:09 -07:00
--c-n-gray-blue-t: hsl(224, 30%, 27%, 0.5);
2023-05-23 20:25:52 -07:00
--f-size: 16px;
2023-05-23 20:55:58 -07:00
--f-family: 'Hanken Grotesk', serif;
--f-normal: 500;
--f-bold: 700;
--f-extra-bold: 800;
2023-05-23 20:25:52 -07:00
}
body {
2023-05-24 09:15:15 -07:00
width: 100vw;
height: 100vh;
font-family: var(--f-family);
font-size: var(--f-size);
2023-05-24 09:15:15 -07:00
background-color: var(--c-n-pale-blue);
@include-media('>desktop') {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
.ResultsCard {
height: 100vh;
2023-05-24 09:15:15 -07:00
background-color: var(--c-n-white);
@include-media('>desktop') {
height: fit-content;
width: 50%;
display: grid;
grid-template: 1fr / 1fr 1fr;
box-shadow: 0 0 60px var(--c-n-lavender);
border-radius: 30px;
}
&__title {
font-size: calc(var(--f-size) + 2px);
2023-05-24 08:50:09 -07:00
font-weight: var(--f-bold);
&--summary {
@extend .ResultsCard__title;
margin-bottom: 1.5rem;
color: var(--c-n-white-t);
2023-05-24 09:15:15 -07:00
@include-media('>desktop') {
margin-bottom: 2rem;
}
}
&--detailed {
@extend .ResultsCard__title;
2023-05-24 08:50:09 -07:00
margin-bottom: 1.5rem;
}
}
}
.ResultsSummary {
padding: 0.5rem 2.5rem 1.25rem;
color: var(--c-n-white);
text-align: center;
background-image: linear-gradient(to bottom, var(--c-bg-main-start), var(--c-bg-main-end));
border-radius: 0 0 30px 30px;
2023-05-24 09:15:15 -07:00
@include-media('>desktop') {
grid-column: 1 / 2;
grid-row: 1 / 2;
border-radius: 30px;
}
&__info {
color: var(--c-n-white-t);
2023-05-24 09:15:15 -07:00
@include-media('>desktop') {
margin-top: 3rem;
}
&--title {
margin-bottom: -.25rem;
font-size: calc(var(--f-size) + 8px);
color: var(--c-n-white);
}
}
}
2023-05-24 08:50:09 -07:00
2023-05-24 09:15:15 -07:00
.ScoreBubble {
display: inline-block;
padding: 2rem 2.6rem 1.6rem;
background-image: linear-gradient(to bottom, var(--c-bg-bubble-start), var(--c-bg-bubble-end));
border-radius: 100%;
&__score {
font-size: 50px;
font-weight: var(--f-extra-bold);
@include-media('>desktop') {
font-size: 75px;
}
}
&__max {
margin-top: .3rem;
font-weight: var(--f-bold);
color: var(--c-n-white-xt);
}
}
2023-05-24 08:50:09 -07:00
.ResultsDetailed {
padding: 1.5rem 2rem;
color: var(--c-n-gray-blue);
2023-05-24 09:15:15 -07:00
@include-media('>desktop') {
grid-column: 2 / 3;
grid-row: 1 / 2;
}
2023-05-24 08:50:09 -07:00
&__category {
width: 100%;
margin: 1.3rem 0;
2023-05-24 09:15:15 -07:00
@include-media('>desktop') {
margin: 1rem 0;
}
2023-05-24 08:50:09 -07:00
}
}
.CategoryScore {
display: flex;
padding: 1.25rem 1rem;
border-radius: 10px;
&__icon {
margin-right: .75rem;
}
&__score {
margin-right: .5rem;
margin-left: auto;
font-weight: var(--f-bold);
color: var(--c-n-gray-blue);
}
&__max {
font-weight: var(--f-bold);
color: var(--c-n-gray-blue-t);
}
&--reaction {
@extend .CategoryScore;
color: var(--c-red);
background-color: var(--c-red-t);
}
&--memory {
@extend .CategoryScore;
color: var(--c-yellow);
background-color: var(--c-yellow-t);
}
&--verbal {
@extend .CategoryScore;
color: var(--c-green);
background-color: var(--c-green-t);
}
&--visual {
@extend .CategoryScore;
color: var(--c-blue);
background-color: var(--c-blue-t);
}
}
.Button {
width: 100%;
padding: 1rem;
font-size: calc(var(--f-size) + 2px);
font-weight: var(--f-bold);
color: var(--c-n-white);
background-color: var(--c-n-gray-blue);
border: none;
border-radius: 30px;
&:hover {
background-image: linear-gradient(to bottom, var(--c-bg-main-start), var(--c-bg-main-end));
}
}
2023-05-24 09:15:15 -07:00
.attribution {
font-size: 11px;
text-align: center;
@include-media('>desktop') {
margin-top: 3rem;
}
a { color: hsl(228, 45%, 44%); }
}