Purecss 131122131645 Phpapp02
Purecss 131122131645 Phpapp02
§ http://www.purecss.io
§ Pure
› Modules
› Customization
› Tools
Source: wix.com
§ “In fact, it has been a constant source of delight for me over the past
year to get to continually tell hordes (literally) of people who want
control what their documents look like in ways that would be trivial in
TeX, Microsoft Word, and every other common text processing
environment: "Sorry, you're screwed.”
http://www.purecss.io
Brow ser C o m p a t i b i l t y
Browser compatibility
§ For a while we just looked at the stats and made our choice
› Until Q4 2004 Internet Explorer was still over 91%
› Its competitors were
• Firefox ~ 3.6%
• Netscape ~ 2.5%
• Safari ~ 1.5%
• Opera ~ 0.5%
Sep 2013
Source: w3counter.com
§ … unfortunately they don’t remove your need to check that the way
your website looks across browsers is consistent
http://www.purecss.io
Screen Size stats
Size Share
1366x768 19.73% Top 10 Screen sizes
320x480 1680x1050
1024x768 13.75% 1600x900
768x1024
1280x800 7.77% 1366x768
1920x1080 6.35% 1440x900
768x1024 4.98%
1920x1080
1600x900 4.01%
320x480 3.51%
1680x1050 2.71%
Source: www.w3counter.com
§ How ?
› Flexible Grids
› Media Queries
› Flexible images
› …
› Server side responsiveness
› …
http://www.purecss.io
Pure Modules
Pure Modules
§ To create a grid
› create a div
› add the class “pure-g”
› … all the elements inside it will now be considered as grid units
§ The grid units inside the grid will have to be of class pure-u-*
§ * is a fraction of the width of the grid,
› e.g. pure-u-3-4 will have a width which is 75% that of the grid
§ All the pure-u-* elements will behave normally for widths over 767px
§ With the forms module you can easily create well designed form
§ To style a form with Pure add the pure-form class to a form element
Compact Form
Aligned Form
Stacked Form .pure-form-aligned
.pure-form-stacked
<div
<div>class="pure-menu pure-menu-open pure-menu-horizontal">
<a href="#" class="pure-menu-heading">Site
href=”#">Site Title</a> Title</a>
<ul>
<li class="pure-menu-selected"><a
<li><a href="#">Home</a></li> href="#">Home</a></li>
<li><a href="#">Flickr</a></li>
<li><a href="#">Messenger</a></li>
<li><a href="#">Sports</a></li>
<li><a href="#">Finance</a></li>
</ul>
</div>
<ul>
<li><a href="#">Flickr</a></li>
<li><a href="#">Messenger</a></li>
<li><a href="#">Sports</a></li>
<li><a href="#">Finance</a></li>
<li class="pure-menu-heading">More Sites!</li>
<li><a href="#">Games</a></li>
<li><a href="#">News</a></li>
<li><a href="#">OMG!</a></li>
</ul>
</div>
<ul class="pure-paginator">
<li><a class="pure-button prev" href="#">«</a></li>
<li><a class="pure-button" href="#">1</a></li>
<li><a class="pure-button pure-button-active" href="#">2</a></li>
<li><a class="pure-button" href="#">3</a></li>
<li><a class="pure-button" href="#">4</a></li>
<li><a class="pure-button" href="#">5</a></li>
<li><a class="pure-button next" href="#">»</a></li>
</ul>
.pure-button-success,
.pure-button-error,
.pure-button-warning,
.pure-button-secondary {
color: white;
border-radius: 4px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.pure-button-success {
background: rgb(28, 184, 65); /* this is a green */
}
.pure-button-error {
background: rgb(202, 60, 60); /* this is a maroon */
}
.pure-button-warning {
background: rgb(223, 117, 20); /* this is an orange */
}
.pure-button-secondary {
background: rgb(66, 184, 221); /* this is a light blue */
}
<table class="pure-table-bordered”>
<table class="pure-table-horizontal”>
<table class="pure-table-striped”>
§ Pure is modular
§ You can pick any module you want choosing from
Name URL
Base http://yui.yahooapis.com/pure/0.3.0/base-min.css
Buttons http://yui.yahooapis.com/pure/0.3.0/buttons-min.css
Tables http://yui.yahooapis.com/pure/0.3.0/tables-min.css
§ Skin Builder
› Online application to help you build a theme for Pure
› Quickly put together a Skin for your web site
§ Grid Builder
› Helps you to create your Pure Grid
§ Contribute on GitHub
› Pure is an open-source project under the BSD License. We welcome issues, pull
requests, and feedback
› https://github.com/yui/pure/
Resource Reference
Pure purecss.io
Pure Github github.com/yui/pure
YUI yuilibrary.com
Skin Builder yui.github.io/skinbuilder/?mode=pure
Reference Link
WebStats W3counter.com
CSS History http://www.w3.org/Style/LieBos2e/history/Overview.html
Mobile Stats www.netmarketshare.com