Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

learn flex box #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions day-1-flexbox/2-flexbox-intro/css/boxes.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
body {
font-family: Arial, Helvetica, sans-serif;
font-family: Arial, Helvetica, sans-serif;
}
ul {
list-style-type: none;
padding: 0;
margin: 0;
border: 1px dotted red;
display: flex;
list-style-type: none;
padding: 0;
margin: 0;
border: 3px dotted red;
flex-flow: row wrap;
justify-content: space-around;
height: 400px;
align-items: center;
}
li {
border: 1px solid #999;
margin: 0.5em;
padding: 0.5em;
border: 1px solid #999;
margin: 0.5em;
padding: 0.5em;
}







.flex2 {
border: 5px dashed blue;
order: 2;
flex: 2 1 50%;
}
80 changes: 63 additions & 17 deletions day-1-flexbox/3-flexbox-grid/begin/css/flexbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,85 @@ html {
}
/* inherit border-box on all elements in the universe and before and after
*/
*,
*:before,
*,
*:before,
*:after {
box-sizing: inherit;
}

body {
font-family: Arial, Geneva, sans-serif;
font-family: Arial, Geneva, sans-serif;
}
a {
color: #2772B0;
color: #2772b0;
}
.wrapper {
width: 97%;
max-width: 1200px;
margin: 0 auto;
float: none;
background-color: #fff;
width: 97%;
max-width: 1200px;
margin: 0 auto;
float: none;
background-color: #fff;
}

div img {
width: 100%;
max-width: 225px;
width: 100%;
max-width: 225px;
}

/* grid system -- mobile first! */


.row {
display: flex;
flex-flow: row wrap;
}
[class*='col-'] {
margin-left: 4%;
flex: 0 0 92%;
}
.col-1-2,
.col-1-4 {
background-color: #ffc;
}
.col-2 {
background-color: #cfc;
}
.col-3 {
background-color: #fcf;
}
.col-4 {
background-color: #cff;
}
/* Mobile Landscape Screen Sizes */
@media only screen and (min-width: 480px) {

@media only screen and (min-width: 480px) {
.col-1-2,
.col-2 {
flex: 0 0 44%;
}
.col-1-4,
.col-3,
.col-4 {
flex: 0 0 92%;
}
}
/* Desktop screen Sizes */
@media only screen and (min-width: 768px) {

}
.col-1-2,
.col-1-4 {
flex: 0 0 20%;
}
.col-2 {
flex: 0 0 44%;
}
.col-3 {
flex: 0 0 68%;
}
.col-4 {
flex: 0 0 96%;
}
.reverse {
flex-direction: row-reverse;
}
.reverse [class*='col-1'] {
margin-left: 0%;
margin-right: 4%;
}
}
Loading