Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#codevember 03 - the simple responsive hypertext-free card design
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
@import url(https://fonts.googleapis.com/css?family=PT+Serif);
html,
body {
margin: 0;
}
html {
height: 100vh;
width: 100vw;
background-color: #00BCD4;
display: flex;
color: rgba(0, 0, 0, 0.8);
font-size: 1em;
}
body {
margin: auto;
width: 60%;
background-color: #fafafa;
border: 2px solid white;
border-radius: 2px;
box-shadow: 0 0 60px rgba(0, 0, 0, 0.1), 0 0 30px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1);
animation: bounceInDown 1s;
}
body:before {
display: block;
content: 'simple responsive hypertext-free card design';
font-family: 'Montserrat', sans-serif;
font-weight: 700;
padding: 1em 0.75em 0.5em;
border-bottom: 1px solid #f5f5f5;
font-size: 1.2em;
text-transform: uppercase;
}
body:after {
display: block;
font-family: 'PT Serif', sans-serif;
content: 'Maecenas sed lorem diam eget risus varius blandit sit amet non magna. Aenean eu leo quam. Pellentesque ornare tusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. \A\A Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean eu leo quam. Pellentesque ornare sem ipsum lacinia quam venenatis vestibulum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. \A\A Etiam porta sem malesuada magna mollis euismod. Donec id elit non mi porta gravida at eget metus. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla. Nullam quis risus eget urna mollis ornare vel eu leo. Maecenas faucibus mollis interdum.';
padding: 1em;
font-size: 0.9rem;
column-count: 2;
column-gap: 2em;
column-rule: 1px solid #f5f5f5;
white-space: pre-wrap;
}
@media (max-width: 850px) {
body:after {
column-count: 1;
}
}
@media (max-width: 550px) {
body {
width: 95%;
}
}
@keyframes bounceInDown {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
0% {
opacity: 0;
transform: translate3d(0, -3000px, 0);
}
60% {
transform: translate3d(0, 25px, 0);
}
75% {
transform: translate3d(0, -10px, 0);
}
90% {
opacity: 1;
transform: translate3d(0, 5px, 0);
}
to {
transform: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment