Created
April 25, 2021 23:20
-
-
Save LukePeters/4e32107ae93db1893e3eed632ec5cc8a to your computer and use it in GitHub Desktop.
Follower Counts App - CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--white: #FFFFFF; | |
--purple: #4D2170; | |
--purple-light: #C18EEA; | |
--purple-medium: #250042; | |
--purple-dark: #18002B; | |
--youtube-red: #FF0000; | |
--twitter-blue: #1DA1F1; | |
--instagram-gradient: linear-gradient( | |
90deg, #F0C900 0%, #EC0916 50%, #993ADE 100% | |
); | |
} | |
* { | |
position: relative; | |
box-sizing: border-box; | |
} | |
body { | |
margin: 0; | |
padding: 0; | |
font-family: 'Roboto', sans-serif; | |
font-size: 16px; | |
line-height: 1.5; | |
letter-spacing: 0.05em; | |
font-weight: normal; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
color: var(--white); | |
background: var(--purple-medium); | |
} | |
/* Large Stats */ | |
.large-stats-wrapper { | |
padding: 50px 30px; | |
background: var(--purple-dark); | |
} | |
.large-stats { | |
margin: 0 auto; | |
max-width: 960px; | |
display: flex; | |
} | |
.stat { | |
padding: 0 50px; | |
width: calc(100% / 3); | |
text-align: center; | |
} | |
.stat:not(:last-child):after { | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
content: ''; | |
width: 1px; | |
display: block; | |
background: var(--purple); | |
} | |
.stat__title { | |
margin: 0; | |
font-size: 15px; | |
font-weight: bold; | |
} | |
.stat__title--youtube { | |
color: var(--youtube-red); | |
} | |
.stat__title--twitter { | |
color: var(--twitter-blue); | |
} | |
.stat__title--instagram { | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; | |
-moz-background-clip: text; | |
-moz-text-fill-color: transparent; | |
background-image: var(--instagram-gradient); | |
} | |
.stat__number { | |
margin: 0; | |
font-size: 100px; | |
line-height: 1.2; | |
font-weight: 900; | |
letter-spacing: 0.02em; | |
} | |
@media screen and (max-width: 1100px) { | |
.large-stats-wrapper { | |
padding: 10px 30px; | |
} | |
.large-stats { | |
align-items: center; | |
flex-direction: column; | |
} | |
.stat { | |
padding: 40px 30px 25px; | |
width: auto; | |
} | |
.stat:not(:last-child):after { | |
top: auto; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
content: ''; | |
width: 100%; | |
height: 1px; | |
} | |
} | |
/* Table */ | |
.table-wrapper { | |
margin: 0 auto; | |
padding: 25px 0 35px; | |
max-width: 900px; | |
} | |
.table { | |
width: 100%; | |
margin: 0 auto; | |
display: block; | |
} | |
.table__row { | |
margin: 0 0 6px; | |
width: 100%; | |
display: flex; | |
} | |
.table__row:first-child .table__cell { | |
font-size: 15px; | |
font-weight: bold; | |
color: var(--purple-light); | |
} | |
.table__cell { | |
padding: 0 0 0 50px; | |
width: 25%; | |
display: table-cell; | |
} | |
@media screen and (max-width: 700px) { | |
.table__row:first-child { | |
display: none; | |
} | |
.table__row { | |
padding: 3px 10px 9px 10px; | |
border-bottom: 1px solid var(--purple); | |
} | |
.table__row:last-child { | |
border-bottom: none; | |
} | |
.table__cell { | |
padding: 0 10px; | |
text-align: center; | |
} | |
.table__cell:nth-child(2):before { | |
content: 'YT: '; | |
color: var(--purple-light); | |
} | |
.table__cell:nth-child(3):before { | |
content: 'TW: '; | |
color: var(--purple-light); | |
} | |
.table__cell:nth-child(4):before { | |
content: 'IG: '; | |
color: var(--purple-light); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment