@primary: #0f2950; @primary-content: #a5B0FF; @primary-dark: #071325; @primary-light: #173f7b; @secondary: #0f5011; @secondary-content: #78e67c; @secondary-dark: #072508; @secondary-light: #177b1a; @background: #18191b; @foreground: #232629; @border: #3b3f45; @copy: #fbfbfb; @copy-light: #d6d8dc; @copy-lighter: #9fa4ac; @success: #0f500f; @warning: #50500f; @error: #500f0f; @success-content: #78e678; @warning-content: #e6e678; @error-content: #e67878; * { box-sizing: border-box; } body { background: @background; font-family: 'Slabo 27px', serif; color: @copy; } .wrapper { margin: 5em auto; max-width: 1000px; background-color: #fff; box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.06); } .header { padding: 30px 30px 0; text-align: center; .title { margin: 0; text-transform: uppercase; font-size: 2.5em; font-weight: 500; line-height: 1.1; } .subtitle { margin: 0; font-size: 1.5em; color: @secondary; font-family: 'Yesteryear', cursive; font-weight: 500; line-height: 1.1; * { margin: 0; font-size: 1em; color: @secondary; font-family: 'Yesteryear', cursive; font-weight: 500; line-height: 1.1; } } } .controll { margin-top: 10px; button { padding: 5px 15px; margin: 5px 10px; font-size: 1em; background-color: @primary; color: @primary-content; border-color: @border; &:hover { color: @secondary; background-color: @secondary-content; } } } //Grid Container .cards { padding: 15px; display: flex; flex-flow: row wrap; } //Cards .card { margin: 15px; width: calc((100% / 3) - 30px); transition: all 0.2s ease-in-out; //media queries for stacking cards @media screen and (max-width: 991px) { width: calc((100% / 2) - 30px); } @media screen and (max-width: 767px) { width: 100%; } &.checked { background-color: #4dc46a; color: #0d2613; } padding: 30px; padding-bottom: 10px; position: relative; cursor: pointer; background-color: @primary-light; color: @primary-content; font-size: 1.5em; text-align: center; transition: all 0.2s ease-in-out; .code { position: absolute; top: 2px; right: 4px; } button { padding: 5px 15px; margin: 5px 10px; font-size: 0.7em; background-color: @primary; color: @primary-content; border-color: @border; &:hover { color: @secondary-content; background-color: @secondary; } } } .hidden { display: none; } //when 3 cards in a row @media screen and (min-width: 992px) { .card:nth-of-type(3n+2) .card__expander { margin-left: calc(-100% - 30px); } .card:nth-of-type(3n+3) .card__expander { margin-left: calc(-200% - 60px); } .card:nth-of-type(3n+4) { clear: left; } .card__expander { width: calc(300% + 60px); } } //when 2 cards in a row @media screen and (min-width: 768px) and (max-width: 991px) { .card:nth-of-type(2n+2) .card__expander { margin-left: calc(-100% - 30px); } .card:nth-of-type(2n+3) { clear: left; } .card__expander { width: calc(200% + 30px); } }