Skip to content

Instantly share code, notes, and snippets.

@t-laird
Last active February 6, 2018 03:40
Show Gist options
  • Save t-laird/80e5bf30e73d60a6559ee34fc420ea3b to your computer and use it in GitHub Desktop.
Save t-laird/80e5bf30e73d60a6559ee34fc420ea3b to your computer and use it in GitHub Desktop.
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,600');
//colors
$accentPrimary: #34D1D1;
$background1: #2f2235;
$background2: #3f3244;
$accentSecondary: #f2f2f2;
$accentTertiary: #d1d2d3;
$background3: #666666;
$black: #000000;
$javascript: #F1E05A;
$html: #E34C26;
$css: #563D7C;
body {
margin: 0px;
padding: 0px;
}
h1,
h2,
h3,
h4,
h5,
p,
ul,
li,
div,
button {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
margin: 0px;
}
button {
background-color: $background1;
color: white;
width: 300px;
margin: 30px auto 20px;
border: none;
padding: 10px 0px;
cursor: pointer;
display: block;
font-size: 16px;
transition: 0.2s;
&:hover {
background-color: $accentSecondary;
color: $accentPrimary;
}
}
header {
height: 50px;
background-color: $background1;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
padding: 0px 50px;
margin-bottom: 25px;
h3{
font-size: 20px;
span {
color: $accentPrimary;
}
}
h5 {
font-size: 16px;
}
}
main {
padding: 0px 50px;
.accordian {
.accordian__header {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
margin-bottom: 50px;
h4 {
padding-right: 40px;
}
.accordian__header__seperator {
border-bottom: 1px solid $accentTertiary;
}
}
.accordian__box {
border-top: none;
margin: 0px 30px;
display: grid;
grid-template-columns: repeat(4, 1fr);
.accordian__tab__selection {
display: flex;
align-items: center;
justify-content: center;
background-color: $accentSecondary;
width: 100%;
height: 100%;
padding: 10px 0px;
border-right: 1px solid $accentSecondary;
border-bottom: 1px solid $accentTertiary;
box-sizing: border-box;
cursor: pointer;
position: relative;
&:nth-of-type(odd) {
border-right: 1px solid white;
border-left: 1px solid white;
}
&.active {
background: white;
border: 1px solid $accentTertiary;
border-bottom: 1px solid white;
}
.accordian__expand__collapse {
width: 15px;
height: 15px;
background-size: contain;
position: absolute;
right: 5px;
top: 13px;
}
}
.accordian__box__content {
grid-column: span 4;
display: grid;
overflow: hidden;
transition: 1s;
height: initial;
border-left: 1px solid $accentTertiary;
border-right: 1px solid $accentTertiary;
border-bottom: 1px solid $accentTertiary;
&.hidden {
min-height: 0px;
border: none;
height: 0px;
padding: 0px 20px;
overflow: hidden;
.accordian__box__content__placeholderimage {
min-height: 0px;
}
.accordian__box__content__words {
max-height: 0px;
}
}
}
}
.accordian__box__content {
display: grid;
min-height: 400px;
padding: 20px;
grid-template-columns: 300px 1fr;
align-items: start;
grid-gap: 30px;
.accordian__box__content__placeholderimage {
background-image: url('../placeholder-image.svg');
transition: 1s;
background-size: 100% 100%;
min-height: 400px;
height: 100%;
}
.accordian__box__content__words {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
transition: 3s;
max-height: 800px;
h3 {
display: flex;
align-items: center;
padding-bottom: 5px;
border-bottom: 1px solid $background3;
width: 100%;
height: 40px;
font-weight: 600;
margin-bottom: 10px;
}
p {
&:nth-of-type(1) {
margin-bottom: 15px;
}
}
}
}
}
.codeContainer {
width: 600px;
display: flex;
flex-wrap: wrap;
grid-template-columns: 1fr;
margin: 20px auto;
height: 0px;
transition: 1s;
padding: 0px;
box-sizing: border-box;
border: none;
overflow: hidden;
&.show {
height: 660px;
.gist {
height: unset;
height: 600px;
transition: 1s;
overflow: scroll;
}
}
ul {
padding: 0px 10px 10px;
width: 100%;
display: grid;
height: 40px;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
list-style: none;
li {
display: flex;
justify-content: center;
align-items: center;
height: 40px;
transition: 0.5s;
cursor: pointer;
&:hover {
color: white;
}
&.selected {
box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4)
}
&.accordian__html {
background: $html;
&:hover {
background: darken($html, 10%);
}
}
&.accordian__css {
background: $css;
&:hover {
background: darken($css, 10%);
}
}
&.accordian__js {
background: $javascript;
&:hover {
background: darken($javascript, 10%);
}
}
}
}
.gist {
width: 100%;
height: 0px;
overflow: hidden;
}
}
}
@media screen and (max-width: 800px) {
main {
padding: 0px 25px;
.accordian {
.accordian__header {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
margin-bottom: 50px;
h4 {
padding-right: 40px;
}
.accordian__header__seperator {
border-bottom: 1px solid $accentTertiary;
}
}
.accordian__box {
.accordian__box__content {
min-height: 250px;
grid-template-columns: 150px 1fr;
.accordian__box__content__placeholderimage {
min-height: 200px;
}
.accordian__box__content__words {
h3 {
font-size: 16px;
}
}
}
}
}
}
}
@media screen and (max-width: 500px) {
main {
padding: 0px 10px;
.accordian {
.accordian__box {
grid-template-columns: 1fr;
.accordian__expand__collapse {
&.minus {
background-image: url('../minus.svg');
}
&.plus {
background-image: url('../plus.svg');
}
}
.accordian__box__content {
grid-template-columns: 1fr;
grid-column: span 1;
.accordian__box__content__placeholderimage {
margin-bottom: 10px;
}
}
.accordian__tab__selection {
border-right: none;
border-bottom: 1px solid $accentTertiary;
&.active {
background: white;
border-bottom: 1px solid white;
}
}
.accordian__tab__selection1 {
order: 1;
}
.accordian__tab__selection2 {
order: 3;
}
.accordian__tab__selection3 {
order: 5;
}
.accordian__tab__selection4 {
order: 7;
}
.accordian__box__content1 {
order: 2;
}
.accordian__box__content2 {
order: 4;
}
.accordian__box__content3 {
order: 6;
}
.accordian__box__content4 {
order: 8;
}
}
}
.codeContainer {
width: 100%;
ul {
grid-template-columns: 1fr;
height: 140px;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment