Created
February 1, 2014 01:49
-
-
Save anonymous/8746788 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Standard Grid</h1> | |
<div class="pure-g"> | |
<div class="pure-u-1-4">Column 1</div> | |
<div class="pure-u-1-4">Column 2</div> | |
<div class="pure-u-1-4">Column 3</div> | |
<div class="pure-u-1-4">Column 4</div> | |
</div> | |
</div> | |
<div class="container"> | |
<h1>Responsive Grid</h1> | |
<div class="pure-g-r"> | |
<div class="pure-u-1-4">Column 1</div> | |
<div class="pure-u-1-4">Column 2</div> | |
<div class="pure-u-1-4">Column 3</div> | |
<div class="pure-u-1-4">Column 4</div> | |
</div> | |
</div> | |
</body> | |
</html> |
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
@screen-sm-min: 768px; | |
@screen-md-min: 992px; | |
@screen-lg-min: 1200px; | |
.container { | |
margin: auto; | |
} | |
/* Small devices (tablets, 768px and up) */ | |
@media (min-width: @screen-sm-min) { | |
.container { | |
max-width: 750px; | |
} | |
} | |
/* Medium devices (desktops, 992px and up) */ | |
@media (min-width: @screen-md-min) { | |
.container { | |
max-width: 970px; | |
} | |
} | |
/* Large devices (large desktops, 1200px and up) */ | |
@media (min-width: @screen-lg-min) { | |
.container { | |
max-width: 1170px; | |
} | |
} | |
/* Add column colors for demonstration */ | |
.pure-g > div, | |
.pure-g-r > div { | |
background-color: #1f8dd6; | |
color: white; | |
padding-top: 1em; | |
text-align: center; | |
} | |
.pure-g :nth-child(odd), | |
.pure-g-r :nth-child(odd){ | |
background-color: #777; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment