Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created April 1, 2020 04:47
Show Gist options
  • Save tomhodgins/36b1a8aecc201244305602f063e0472a to your computer and use it in GitHub Desktop.
Save tomhodgins/36b1a8aecc201244305602f063e0472a to your computer and use it in GitHub Desktop.
@--important {
.mobile-hero,
.desktop-hero {
background-image: none;
}
.home-hero .button {
width: 100%;
max-width: 500px;
font-size: 1.75rem;
}
.home-hero {
min-height: 0;
padding-bottom: 4%;
}
}
@--min-width 1000px {
.home-hero {
padding-bottom: 8% !important;
}
}
/* Centered hero content, minus background image */
@--variation '6-1' {
.mobile-hero,
.desktop-hero {
text-align: center;
}
.desktop-hero ul {
max-width: 350px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
}
/* Variations 2, 3, 4 */
@--variation '6-2', '6-3', '6-4' {
@--reset test-6;
test-6 {
display: flex;
flex-direction: column;
align-items: center;
}
test-6 ~ .hero-wrapper {
display: none !important
}
flex-container {
display: flex;
flex-direction: column;
align-items: center;
max-width: 1200px;
margin: auto;
}
@--min-width 1000px {
flex-container {
flex-direction: row;
}
flex-container original-hero,
flex-container new-hero {
flex: 2;
}
flex-container features-list,
flex-container logo-garden {
flex: 1;
}
}
}
/* Variations 2 & 4 include features list */
@--variation '6-2', '6-4' {
test-6 features-list {
background: #F7F9FA;
border-radius: 5px;
padding: calc(16px + 2vw) calc(16px + 2vw);
margin: 1.25rem;
}
test-6 features-list h1 {
color: black;
font-size: 18pt;
margin-bottom: 1em;
}
test-6 features-list ul {
padding-left: 0;
margin-left: 0;
margin-top: 10px;
}
test-6 features-list ul li {
list-style-type: none;
padding-left: 20px;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7' viewBox='0 0 7 7'%3E%3Crect width='7' height='7' rx='2' fill='currentColor' fill-rule='evenodd'/%3E%3C/svg%3E") left 12px no-repeat;
font-weight: 600;
font-size: 14pt;
}
test-6 features-list ul li + li {
margin-top: 1em;
}
test-6 features-list li b {
font-weight: 900;
}
}
/* Variation 3 includes logo garden */
@--variation '6-3' {
test-6 logo-garden {
background: #F7F9FA;
border-radius: 5px;
padding: calc(16px + 2vw) calc(16px + 2vw);
margin: 1.25rem auto;
max-width: 500px;
}
test-6 logo-garden h1 {
color: black;
font-size: 18pt;
margin-bottom: 1em;
}
test-6 logo-garden ul {
display: grid;
grid-gap: 2em;
grid-template-columns: repeat(3, auto);
list-style-type: none;
padding: 0;
margin: 10px 0 0 0;
}
test-6 logo-garden li {
display: flex;
justify-content: center;
align-items: center;
}
}
/* Variation 4 includes new hero content */
@--variation '6-4' {
test-6 new-hero {
display: flex;
flex-direction: column;
padding: 3em 1em 1em;
}
test-6 new-hero h1 {
color: black;
font-size: calc(44px + (66 - 44) * ((100vw - 40em)/ (1440 - 640)));
margin-bottom: .25em;
}
test-6 new-hero h1 br {
display: none;
}
test-6 new-hero h2 {
margin-top: .5em;
margin-bottom: 1em;
max-width: 550px;
font-size: calc(16px + 1vw);
}
test-6 new-hero a {
width: 100%;
max-width: 500px;
padding: 20px 60px 18px;
color: white;
font-size: 1.75rem;
text-align: center;
font-family: Nunito, sans-serif;
font-weight: 600;
border-radius: 5px;
background-color: #755FAD;
text-shadow: rgba(0, 0, 0, 0) 1px 1px 2px;
box-shadow: rgba(0, 0, 0, 0) 0 5px 15px;
transition:
text-shadow .2s ease-in-out,
box-shadow .2s ease-in-out,
;
}
test-6 new-hero a:hover,
test-6 new-hero a:focus {
color: white;
text-shadow: rgba(0, 0, 0, .15) 1px 1px 2px;
box-shadow: rgba(0, 0, 0, .15) 0 5px 15px;
}
@--min-width 1000px {
test-6 new-hero {
padding: 3em 1em;
}
test-6 new-hero h1 {
font-size: 4rem;
}
test-6 new-hero h1 br {
display: block;
}
test-6 new-hero h2 {
font-size: 1.75rem;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment