Last active
July 4, 2017 00:02
-
-
Save bmorelli25/d319eadd950cbec5e411d0f27e2191ad to your computer and use it in GitHub Desktop.
Minimalist Flexbox Card
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
body { | |
font-family: 'Open Sans', sans-serif; | |
} | |
.card { | |
width: 150px; /* Set width of cards */ | |
display: flex; /* Children use Flexbox */ | |
flex-direction: column; /* Rotate Axis */ | |
border: 1px solid #EF9A9A; /* Set up Border */ | |
border-radius: 4px; /* Slightly Curve edges */ | |
overflow: hidden; /* Fixes the corners */ | |
margin: 5px; /* Add space between cards */ | |
} | |
.card-header { | |
color: #D32F2F; | |
text-align: center; | |
font-size: 12px; | |
font-weight: 600; | |
border-bottom: 1px solid #EF9A9A; | |
background-color: #FFEBEE; | |
padding: 5px 10px; | |
} | |
.card-main { | |
display: flex; /* Children use Flexbox */ | |
flex-direction: column; /* Rotate Axis to Vertical */ | |
justify-content: center; /* Group Children in Center */ | |
align-items: center; /* Group Children in Center (on cross axis) */ | |
padding: 15px 0; /* Add padding to the top/bottom */ | |
} | |
.material-icons { | |
font-size: 36px; | |
color: #D32F2F; | |
margin-bottom: 5px; | |
} | |
.main-description { | |
color: #D32F2F; | |
font-size: 12px; | |
text-align: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment