SlideShare a Scribd company logo
1 of 45
Download to read offline
Pure
A set of small, responsive CSS modules
that you can use in every web project
PRESENTED BY Riccardo Cocetta < rcocetta @ yahoo-inc.com >
21 November 2013
Intro, what’s Pure?
§  Pure is an OpenSource CSS Framework, designed to be the CSS
foundation for your web site or web app
§  It wants to leave a Minimal Footprint
› 

4.4 K if you use all the modules

§  It wants to stay out of your way
› 

Pure has minimal styling, and leaves that to you

§  It’s made with mobile in mind
› 

Pure is responsive

§  It’s extensible
§  Online customisation tools are available
§  http://www.purecss.io

2

PureCSS – Riccardo Cocetta
Agenda
§  A brief history of CSS
§  CSS Normalization
§  Responsiveness
§  Pure
› 

Modules

› 

Customization

› 

Tools

§  Let’s play with code

3

Pure – Riccardo Cocetta – www.purecss.io
How did we get here?
Design vs Development

Source: wix.com
5

Pure – Riccardo Cocetta – www.purecss.io
Design vs Development
§  “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.”
Marc Andreessen (cofounder of Netscape)
§  On October 13, 1994 Marc Andreessen announced to www-talk that
the first beta release of Mozilla (which later turned into Netscape
Navigator) was available for testing. Among the new tags the new
browser supported was center and more tags were to follow shortly.

6

Pure – Riccardo Cocetta – www.purecss.io
Brief history of CSS
When

Notes

1980

Stylesheets are already among us

Since SGML (Standard General Markup
Language) was around

1994

CHSS
(Cascading HTML StyleSheet) Draft
Presented

3 Days before the announcement of
Netscape Navigator

1996

CSS level 1
Recommendation presented by W3C

After some work and the presentation of
other standards such as JSSS.
IE3 was released

1998

CSS level 2
Recommendation

Adds positioning, media type, font
properties etc .
Problematic adoption

2004-2007

CSS level 2.1

Solve problems with difficult adoption and
some errata in the 2.0.
Moved back and forth between Draft and
CR

1999-2012

CSS level 3
Modules

Different modules, introduces a lot of
things

…

7

What

CSS 4

Some CSS4 modules are already around

Pure – Riccardo Cocetta – www.purecss.io
CSS Frameworks
§  In time we realised we were
repeating the same patterns
§  The way to avoid this was to
build CSS Frameworks :
› 

Libraries of CSS

› 

Predefined elements

› 

Predefined Layouts

› 

Help you in not reinventing the wheel

§  Many frameworks out there
› 
› 

8

Different ideas
Different philosophy

Pure – Riccardo Cocetta – www.purecss.io
PURE
Is a modular, lightweight CSS Framework

http://www.purecss.io
Brow ser C o m p a t i b i l t y
Browser compatibility
§  FACT: Browsers don’t render CSS in a consistent way
§  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%

§  Then something changed…

11

Pure – Riccardo Cocetta – www.purecss.io
Some numbers
Sep 2013

Source: w3counter.com

12

Pure – Riccardo Cocetta – www.purecss.io
Mobile Browsers shares

Source: www.netmarketshare.com - Oct 2013

13

Pure – Riccardo Cocetta – www.purecss.io
How do we solve this issue? Best viewed…

14

Pure – Riccardo Cocetta – www.purecss.io
CSS Normalization
§  Removes the inconsistent styling of HTML elements provided by
browsers
§  Help you build your own CSS on a consistent base

§  … unfortunately they don’t remove your need to check that the way
your website looks across browsers is consistent

15

Pure – Riccardo Cocetta – www.purecss.io
PURE
Builds on Normalize.css and provides layout and styling for
native HTML elements, plus the most common UI components.
It's what you need, without the cruft.

http://www.purecss.io
Screen Size stats

Size

Share

1366x768
1024x768
1280x800
1920x1080
1280x1024
1440x900
768x1024
1600x900
320x480
1680x1050

19.73%
13.75%
7.77%
6.35%
5.91%
5.07%
4.98%
4.01%
3.51%
2.71%

Top 10 Screen sizes
1600x900

320x480

768x1024

Pure – Riccardo Cocetta – www.purecss.io

1366x768

1440x900

1024x768
1280x1024
1920x1080

Source: www.w3counter.com
17

1680x1050

1280x800
Responsive Design
§  Design a web site in order to have a good UX on different devices
› 

Desktop

› 

Tablet

› 

Phone

§  How ?
› 
› 

Media Queries

› 

Flexible images

› 

…

› 

Server side responsiveness

› 

18

Flexible Grids

…

Pure – Riccardo Cocetta – www.purecss.io
PURE
Pure is responsive out of the box, so elements look great on all
screen sizes.

http://www.purecss.io
Pure Modules
Pure Modules
§  Pure is a modular system
§  You can choose and import the modules you need
› 

Base

› 

Grids

Base (1.2 KB)

› 

Menus

Grids (0.9 KB)

› 

Forms

Menus (1.2 KB)

› 

Tables

Forms (1.4 KB)

› 

Buttons

Tables (0.5 KB)

§  The whole minified Library weighs 4.4 KB

21

Pure – Riccardo Cocetta – www.purecss.io

Buttons (0.8 KB)
Base
§  The base module of Pure is based on Normalize.css
§  It defines some minimal typography:
› 

Headings

› 

Inline Styles

› 

Lists

› 

Blockquotes

› 

Addresses

› 

Abbr

§  It does CSS Normalization

22

Pure – Riccardo Cocetta – www.purecss.io
Grids
Pure bases its layout on grids:
§ 
§ 
§ 
§ 
§ 

Pages can be seen as grids (pure-g)
Grids contain units (pure-u)
All child elements of a grid must be units
Content goes inside grid units
The width of the units is expressed in fractions

§  Grids are flexible

23

Pure – Riccardo Cocetta – www.purecss.io
Grids
A page

24

Pure – Riccardo Cocetta – www.purecss.io
Grids
§  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

§  You can have nested grids

25

Pure – Riccardo Cocetta – www.purecss.io
Grid’s Example
<div	
  class="pure-­‐g">	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐1”></div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐1-­‐4”></div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐1-­‐3”></div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐3-­‐4”></div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐1-­‐3”></div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐u-­‐1-­‐2”>	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  <div	
  class="pure-­‐g”>	
  
	
  

	
  <div	
  class=“pure-­‐u-­‐1-­‐2”></div>	
  

	
  

	
  <div	
  class=“pure-­‐u-­‐1-­‐2”></div>	
  

	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  </div>	
  
	
  	
  	
  	
  	
  	
  	
  	
  </div>	
  
</div>	
  

26

Pure – Riccardo Cocetta – www.purecss.io
Responsive Grids
§  Applying the class pure-g-r the grid becomes Responsive
§  All the pure-u-* elements will behave normally for widths over 767px
§  At 767px the pure-u-* elements will collapse to 100% width
§  Helper classes:
› 
› 

Pure-hidden-tablet (elements hidden between 768px and 979px)

› 

27

Pure-hidden-phone (Elements hidden belox 768px)
Pure-hidden-desktop (elements hidden above 979px)

Pure – Riccardo Cocetta – www.purecss.io
Forms
§  With the forms module you can easily create well designed form
› 

Minimal and clean markup

› 

Responsive

› 

Different Sizes

› 

Different Styles

§  To style a form with Pure add the pure-form class to a form element

28

Pure – Riccardo Cocetta – www.purecss.io
Forms
§  You can specify different types of form layout

Compact Form

Stacked Form
.pure-form-stacked

29

Pure – Riccardo Cocetta – www.purecss.io

Aligned Form
.pure-form-aligned
Form Elements Sizing
§  With the class pure-input-x-y it’s possible to size elements relatively to
their container (just as for the grids)

30

Pure – Riccardo Cocetta – www.purecss.io
Styling and other elements
§  Rounded elements with pure-input-rounded

§  Group elements with pure-group

31

Pure – Riccardo Cocetta – www.purecss.io
Pure Menus
§  A module to create your menus with pure-menu class
§  Nicely style menus built with simple markup

<div class="pure-menu pure-menu-open pure-menu-horizontal">
<div>
<a href="#" class="pure-menu-heading">Site Title</a>
href=”#">Site Title</a>
<ul>
<li class="pure-menu-selected"><a href="#">Home</a></li>
<li><a 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>
32

Pure – Riccardo Cocetta – www.purecss.io
Pure Vertical Menus
•  In pure menus are vertical by default
•  So you just need to add pure-menu class
•  Pure-menu-heading might be useful
<div class="pure-menu pure-menu-open">
<a class="pure-menu-heading">Yahoo! Sites</a>
<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>

33

Pure – Riccardo Cocetta – www.purecss.io
Pure Menu - Paginator
§  Just add pure-paginator class

<ul class="pure-paginator">
<li><a class="pure-button prev" href="#">&#171;</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="#">&#187;</a></li>
</ul>
34

Pure – Riccardo Cocetta – www.purecss.io
Pure Buttons
In the buttons module you can find a nice set of buttons:
<a class="pure-button" href="#">A Pure Button</a>
<button class="pure-button">A Pure Button</button>

<a class="pure-button pure-button-disabled" href="#">
A DisableButton</a>

<a class="pure-button pure-button-primary" href="#"> A
Primary Button</a>

35

Pure – Riccardo Cocetta – www.purecss.io
Customize buttons
.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 */
}

36

Pure – Riccardo Cocetta – www.purecss.io
Pure Tables
In the tables module you can find different examples of tables
<table class="pure-table">
<thead>
<tr>
<th>#</th>
<th>Make</th>
<th>Model</th>
<th>Year</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Honda</td>
<td>Accord</td>
<td>2009</td>
</tr>
[…]
</tbody>
</table>

37

Pure – Riccardo Cocetta – www.purecss.io
Pure Tables
<table class="pure-table-bordered”>

<table class="pure-table-horizontal”>

<table class="pure-table-striped”>
*this won’t work in IE8 or lower as it
uses the CSS3 nth-child selector
38

Pure – Riccardo Cocetta – www.purecss.io
Modules Summary
§  Pure is modular
§  You can pick any module you want choosing from
Name
Base

http://yui.yahooapis.com/pure/0.3.0/base-min.css

Buttons

http://yui.yahooapis.com/pure/0.3.0/buttons-min.css

Forms (Responsive)

http://yui.yahooapis.com/pure/0.3.0/forms-min.css

Forms (Non-Responsive)

http://yui.yahooapis.com/pure/0.3.0/forms-nr-min.css

Grids (Responsive)

http://yui.yahooapis.com/pure/0.3.0/grids-min.css

Grids (Non-Responsive)

http://yui.yahooapis.com/pure/0.3.0/grids-nr-min.css

Menus (Responsive)

http://yui.yahooapis.com/pure/0.3.0/menus-min.css

Menus (Non-Responsive)

http://yui.yahooapis.com/pure/0.3.0/menus-nr-min.css

Tables

39

URL

http://yui.yahooapis.com/pure/0.3.0/tables-min.css

Pure – Riccardo Cocetta – www.purecss.io
More …
How do I get Pure?
§  www.purecss.io is your first reference
§  Download and link the rollup you want
› 

Responsive
•  http://yui.yahooapis.com/pure/0.3.0/pure-min.css

› 

Non Responsive
•  http://yui.yahooapis.com/pure/0.3.0/pure-nr-min.css

§  Or download only the modules you need
› 
› 

41

Yahoo CDN supports combo handling, so with 1 HTTP request you can get the
modules you need
http://yui.yahooapis.com/combo?pure/0.3.0/base-min.css&pure/0.3.0/gridsmin.css&pure/0.3.0/forms-min.css

Pure – Riccardo Cocetta – www.purecss.io
Predefined Layouts + Extensions
§  Pure stays out of your way, but if you want…
§  Layout examples from the Pure team for
› 

Blog

› 

E-Mail

› 

Photo Gallery

› 

Landing Page

› 

Pricing table

§  You can find them at http://purecss.io/layouts/
§  You can easily extend Pure with your own classes
§  You can make it work with other frameworks such as Bootstrap

42

Pure – Riccardo Cocetta – www.purecss.io
Online Tools + Contribute
§  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
› 
› 

43

Pure is an open-source project under the BSD License. We welcome issues, pull
requests, and feedback
https://github.com/yui/pure/

Pure – Riccardo Cocetta – www.purecss.io
Resources and references
Resource
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

44

Reference

www.netmarketshare.com

Pure – Riccardo Cocetta – www.purecss.io
What’s next?

More Related Content

What's hot

OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGIMike Pittaro
 
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTUREVULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURENurul Haszeli Ahmad
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH Ming
 
Unix system programming
Unix system programmingUnix system programming
Unix system programmingSyed Mustafa
 
Topic #3 of outline Server Environment.pptx
Topic #3 of outline Server Environment.pptxTopic #3 of outline Server Environment.pptx
Topic #3 of outline Server Environment.pptxAyeCS11
 
Windows Operating System.pptx
Windows Operating System.pptxWindows Operating System.pptx
Windows Operating System.pptxOnyemaobiAmarachi
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupdotCloud
 
Rsyslog log normalization
Rsyslog log normalizationRsyslog log normalization
Rsyslog log normalizationRainer Gerhards
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Memory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdfMemory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdfAdrian Huang
 
Bruh! Do you even diff?—Diffing Microsoft Patches to Find Vulnerabilities
Bruh! Do you even diff?—Diffing Microsoft Patches to Find VulnerabilitiesBruh! Do you even diff?—Diffing Microsoft Patches to Find Vulnerabilities
Bruh! Do you even diff?—Diffing Microsoft Patches to Find VulnerabilitiesPriyanka Aash
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
Detectando DDoS e intrusiones con RouterOS
Detectando DDoS e intrusiones con RouterOSDetectando DDoS e intrusiones con RouterOS
Detectando DDoS e intrusiones con RouterOSPavel Odintsov
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialSaju Madhavan
 
Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Lucas Leong
 
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco GrassiShakacon
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB plc
 

What's hot (20)

Iocage
IocageIocage
Iocage
 
OpenStack API's and WSGI
OpenStack API's and WSGIOpenStack API's and WSGI
OpenStack API's and WSGI
 
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTUREVULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
VULNERABILITIES AND EXPLOITATION IN COMPUTER SYSTEM – PAST, PRESENT, AND FUTURE
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Linux Servers
Linux ServersLinux Servers
Linux Servers
 
Unix system programming
Unix system programmingUnix system programming
Unix system programming
 
Topic #3 of outline Server Environment.pptx
Topic #3 of outline Server Environment.pptxTopic #3 of outline Server Environment.pptx
Topic #3 of outline Server Environment.pptx
 
Windows Operating System.pptx
Windows Operating System.pptxWindows Operating System.pptx
Windows Operating System.pptx
 
Docker presentation | Paris Docker Meetup
Docker presentation | Paris Docker MeetupDocker presentation | Paris Docker Meetup
Docker presentation | Paris Docker Meetup
 
Rsyslog log normalization
Rsyslog log normalizationRsyslog log normalization
Rsyslog log normalization
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Memory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdfMemory Compaction in Linux Kernel.pdf
Memory Compaction in Linux Kernel.pdf
 
Bruh! Do you even diff?—Diffing Microsoft Patches to Find Vulnerabilities
Bruh! Do you even diff?—Diffing Microsoft Patches to Find VulnerabilitiesBruh! Do you even diff?—Diffing Microsoft Patches to Find Vulnerabilities
Bruh! Do you even diff?—Diffing Microsoft Patches to Find Vulnerabilities
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Detectando DDoS e intrusiones con RouterOS
Detectando DDoS e intrusiones con RouterOSDetectando DDoS e intrusiones con RouterOS
Detectando DDoS e intrusiones con RouterOS
 
OpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf TutorialOpenStack DevStack Configuration localrc local.conf Tutorial
OpenStack DevStack Configuration localrc local.conf Tutorial
 
Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...Make static instrumentation great again, High performance fuzzing for Windows...
Make static instrumentation great again, High performance fuzzing for Windows...
 
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
 
Podman rootless containers
Podman rootless containersPodman rootless containers
Podman rootless containers
 

Similar to Pure CSS By Yahoo

Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Mediacurrent
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSZoe Gillenwater
 
Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Ryan Cross
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply ResponsiveDenise Jacobs
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationCharlie Moad
 
Workflow Essentials for Web Development
Workflow Essentials for Web DevelopmentWorkflow Essentials for Web Development
Workflow Essentials for Web DevelopmentXavier Porter
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3Denise Jacobs
 
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...WP Engine
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondDenise Jacobs
 
The GE Design System and thoughts about craft at scale
The GE Design System and thoughts about craft at scaleThe GE Design System and thoughts about craft at scale
The GE Design System and thoughts about craft at scaleDavid Cronin
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondDenise Jacobs
 
Should you use WordPress for your non-profit websites?
Should you use WordPress for your non-profit websites?Should you use WordPress for your non-profit websites?
Should you use WordPress for your non-profit websites?Bethany Siegler
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS FrameworksAdrian Westlake
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalRod Martin
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionDr. Arif Wider
 

Similar to Pure CSS By Yahoo (20)

Class15
Class15Class15
Class15
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
Using a CSS Framework
Using a CSS FrameworkUsing a CSS Framework
Using a CSS Framework
 
Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)Drupal Theming with CSS Frameworks (960grid)
Drupal Theming with CSS Frameworks (960grid)
 
CSS3: Simply Responsive
CSS3: Simply ResponsiveCSS3: Simply Responsive
CSS3: Simply Responsive
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
 
Workflow Essentials for Web Development
Workflow Essentials for Web DevelopmentWorkflow Essentials for Web Development
Workflow Essentials for Web Development
 
Simply Responsive CSS3
Simply Responsive CSS3Simply Responsive CSS3
Simply Responsive CSS3
 
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
 
The GE Design System and thoughts about craft at scale
The GE Design System and thoughts about craft at scaleThe GE Design System and thoughts about craft at scale
The GE Design System and thoughts about craft at scale
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 
CSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to RespondCSS3: Ripe and Ready to Respond
CSS3: Ripe and Ready to Respond
 
Should you use WordPress for your non-profit websites?
Should you use WordPress for your non-profit websites?Should you use WordPress for your non-profit websites?
Should you use WordPress for your non-profit websites?
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
 
An Introduction to CSS Frameworks
An Introduction to CSS FrameworksAn Introduction to CSS Frameworks
An Introduction to CSS Frameworks
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 

More from Nathan O'Hanlon

How to Increase Community Online
How to Increase Community OnlineHow to Increase Community Online
How to Increase Community OnlineNathan O'Hanlon
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Nathan O'Hanlon
 
Running Meetups using Social Networks
Running Meetups using Social NetworksRunning Meetups using Social Networks
Running Meetups using Social NetworksNathan O'Hanlon
 
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...London Web - Making a usable accessible website using HTML5 and CSS3 allowing...
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...Nathan O'Hanlon
 

More from Nathan O'Hanlon (6)

How to Increase Community Online
How to Increase Community OnlineHow to Increase Community Online
How to Increase Community Online
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
 
Running Meetups using Social Networks
Running Meetups using Social NetworksRunning Meetups using Social Networks
Running Meetups using Social Networks
 
Undercover Ux Slides
Undercover Ux SlidesUndercover Ux Slides
Undercover Ux Slides
 
SXSW After Party
SXSW After PartySXSW After Party
SXSW After Party
 
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...London Web - Making a usable accessible website using HTML5 and CSS3 allowing...
London Web - Making a usable accessible website using HTML5 and CSS3 allowing...
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Pure CSS By Yahoo

  • 1. Pure A set of small, responsive CSS modules that you can use in every web project PRESENTED BY Riccardo Cocetta < rcocetta @ yahoo-inc.com > 21 November 2013
  • 2. Intro, what’s Pure? §  Pure is an OpenSource CSS Framework, designed to be the CSS foundation for your web site or web app §  It wants to leave a Minimal Footprint ›  4.4 K if you use all the modules §  It wants to stay out of your way ›  Pure has minimal styling, and leaves that to you §  It’s made with mobile in mind ›  Pure is responsive §  It’s extensible §  Online customisation tools are available §  http://www.purecss.io 2 PureCSS – Riccardo Cocetta
  • 3. Agenda §  A brief history of CSS §  CSS Normalization §  Responsiveness §  Pure ›  Modules ›  Customization ›  Tools §  Let’s play with code 3 Pure – Riccardo Cocetta – www.purecss.io
  • 4. How did we get here?
  • 5. Design vs Development Source: wix.com 5 Pure – Riccardo Cocetta – www.purecss.io
  • 6. Design vs Development §  “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.” Marc Andreessen (cofounder of Netscape) §  On October 13, 1994 Marc Andreessen announced to www-talk that the first beta release of Mozilla (which later turned into Netscape Navigator) was available for testing. Among the new tags the new browser supported was center and more tags were to follow shortly. 6 Pure – Riccardo Cocetta – www.purecss.io
  • 7. Brief history of CSS When Notes 1980 Stylesheets are already among us Since SGML (Standard General Markup Language) was around 1994 CHSS (Cascading HTML StyleSheet) Draft Presented 3 Days before the announcement of Netscape Navigator 1996 CSS level 1 Recommendation presented by W3C After some work and the presentation of other standards such as JSSS. IE3 was released 1998 CSS level 2 Recommendation Adds positioning, media type, font properties etc . Problematic adoption 2004-2007 CSS level 2.1 Solve problems with difficult adoption and some errata in the 2.0. Moved back and forth between Draft and CR 1999-2012 CSS level 3 Modules Different modules, introduces a lot of things … 7 What CSS 4 Some CSS4 modules are already around Pure – Riccardo Cocetta – www.purecss.io
  • 8. CSS Frameworks §  In time we realised we were repeating the same patterns §  The way to avoid this was to build CSS Frameworks : ›  Libraries of CSS ›  Predefined elements ›  Predefined Layouts ›  Help you in not reinventing the wheel §  Many frameworks out there ›  ›  8 Different ideas Different philosophy Pure – Riccardo Cocetta – www.purecss.io
  • 9. PURE Is a modular, lightweight CSS Framework http://www.purecss.io
  • 10. Brow ser C o m p a t i b i l t y
  • 11. Browser compatibility §  FACT: Browsers don’t render CSS in a consistent way §  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% §  Then something changed… 11 Pure – Riccardo Cocetta – www.purecss.io
  • 12. Some numbers Sep 2013 Source: w3counter.com 12 Pure – Riccardo Cocetta – www.purecss.io
  • 13. Mobile Browsers shares Source: www.netmarketshare.com - Oct 2013 13 Pure – Riccardo Cocetta – www.purecss.io
  • 14. How do we solve this issue? Best viewed… 14 Pure – Riccardo Cocetta – www.purecss.io
  • 15. CSS Normalization §  Removes the inconsistent styling of HTML elements provided by browsers §  Help you build your own CSS on a consistent base §  … unfortunately they don’t remove your need to check that the way your website looks across browsers is consistent 15 Pure – Riccardo Cocetta – www.purecss.io
  • 16. PURE Builds on Normalize.css and provides layout and styling for native HTML elements, plus the most common UI components. It's what you need, without the cruft. http://www.purecss.io
  • 17. Screen Size stats Size Share 1366x768 1024x768 1280x800 1920x1080 1280x1024 1440x900 768x1024 1600x900 320x480 1680x1050 19.73% 13.75% 7.77% 6.35% 5.91% 5.07% 4.98% 4.01% 3.51% 2.71% Top 10 Screen sizes 1600x900 320x480 768x1024 Pure – Riccardo Cocetta – www.purecss.io 1366x768 1440x900 1024x768 1280x1024 1920x1080 Source: www.w3counter.com 17 1680x1050 1280x800
  • 18. Responsive Design §  Design a web site in order to have a good UX on different devices ›  Desktop ›  Tablet ›  Phone §  How ? ›  ›  Media Queries ›  Flexible images ›  … ›  Server side responsiveness ›  18 Flexible Grids … Pure – Riccardo Cocetta – www.purecss.io
  • 19. PURE Pure is responsive out of the box, so elements look great on all screen sizes. http://www.purecss.io
  • 21. Pure Modules §  Pure is a modular system §  You can choose and import the modules you need ›  Base ›  Grids Base (1.2 KB) ›  Menus Grids (0.9 KB) ›  Forms Menus (1.2 KB) ›  Tables Forms (1.4 KB) ›  Buttons Tables (0.5 KB) §  The whole minified Library weighs 4.4 KB 21 Pure – Riccardo Cocetta – www.purecss.io Buttons (0.8 KB)
  • 22. Base §  The base module of Pure is based on Normalize.css §  It defines some minimal typography: ›  Headings ›  Inline Styles ›  Lists ›  Blockquotes ›  Addresses ›  Abbr §  It does CSS Normalization 22 Pure – Riccardo Cocetta – www.purecss.io
  • 23. Grids Pure bases its layout on grids: §  §  §  §  §  Pages can be seen as grids (pure-g) Grids contain units (pure-u) All child elements of a grid must be units Content goes inside grid units The width of the units is expressed in fractions §  Grids are flexible 23 Pure – Riccardo Cocetta – www.purecss.io
  • 24. Grids A page 24 Pure – Riccardo Cocetta – www.purecss.io
  • 25. Grids §  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 §  You can have nested grids 25 Pure – Riccardo Cocetta – www.purecss.io
  • 26. Grid’s Example <div  class="pure-­‐g">                  <div  class="pure-­‐u-­‐1”></div>                  <div  class="pure-­‐u-­‐1-­‐4”></div>                  <div  class="pure-­‐u-­‐1-­‐3”></div>                  <div  class="pure-­‐u-­‐3-­‐4”></div>                  <div  class="pure-­‐u-­‐1-­‐3”></div>                  <div  class="pure-­‐u-­‐1-­‐2”>                            <div  class="pure-­‐g”>      <div  class=“pure-­‐u-­‐1-­‐2”></div>      <div  class=“pure-­‐u-­‐1-­‐2”></div>                            </div>                  </div>   </div>   26 Pure – Riccardo Cocetta – www.purecss.io
  • 27. Responsive Grids §  Applying the class pure-g-r the grid becomes Responsive §  All the pure-u-* elements will behave normally for widths over 767px §  At 767px the pure-u-* elements will collapse to 100% width §  Helper classes: ›  ›  Pure-hidden-tablet (elements hidden between 768px and 979px) ›  27 Pure-hidden-phone (Elements hidden belox 768px) Pure-hidden-desktop (elements hidden above 979px) Pure – Riccardo Cocetta – www.purecss.io
  • 28. Forms §  With the forms module you can easily create well designed form ›  Minimal and clean markup ›  Responsive ›  Different Sizes ›  Different Styles §  To style a form with Pure add the pure-form class to a form element 28 Pure – Riccardo Cocetta – www.purecss.io
  • 29. Forms §  You can specify different types of form layout Compact Form Stacked Form .pure-form-stacked 29 Pure – Riccardo Cocetta – www.purecss.io Aligned Form .pure-form-aligned
  • 30. Form Elements Sizing §  With the class pure-input-x-y it’s possible to size elements relatively to their container (just as for the grids) 30 Pure – Riccardo Cocetta – www.purecss.io
  • 31. Styling and other elements §  Rounded elements with pure-input-rounded §  Group elements with pure-group 31 Pure – Riccardo Cocetta – www.purecss.io
  • 32. Pure Menus §  A module to create your menus with pure-menu class §  Nicely style menus built with simple markup <div class="pure-menu pure-menu-open pure-menu-horizontal"> <div> <a href="#" class="pure-menu-heading">Site Title</a> href=”#">Site Title</a> <ul> <li class="pure-menu-selected"><a href="#">Home</a></li> <li><a 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> 32 Pure – Riccardo Cocetta – www.purecss.io
  • 33. Pure Vertical Menus •  In pure menus are vertical by default •  So you just need to add pure-menu class •  Pure-menu-heading might be useful <div class="pure-menu pure-menu-open"> <a class="pure-menu-heading">Yahoo! Sites</a> <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> 33 Pure – Riccardo Cocetta – www.purecss.io
  • 34. Pure Menu - Paginator §  Just add pure-paginator class <ul class="pure-paginator"> <li><a class="pure-button prev" href="#">&#171;</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="#">&#187;</a></li> </ul> 34 Pure – Riccardo Cocetta – www.purecss.io
  • 35. Pure Buttons In the buttons module you can find a nice set of buttons: <a class="pure-button" href="#">A Pure Button</a> <button class="pure-button">A Pure Button</button> <a class="pure-button pure-button-disabled" href="#"> A DisableButton</a> <a class="pure-button pure-button-primary" href="#"> A Primary Button</a> 35 Pure – Riccardo Cocetta – www.purecss.io
  • 36. Customize buttons .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 */ } 36 Pure – Riccardo Cocetta – www.purecss.io
  • 37. Pure Tables In the tables module you can find different examples of tables <table class="pure-table"> <thead> <tr> <th>#</th> <th>Make</th> <th>Model</th> <th>Year</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Honda</td> <td>Accord</td> <td>2009</td> </tr> […] </tbody> </table> 37 Pure – Riccardo Cocetta – www.purecss.io
  • 38. Pure Tables <table class="pure-table-bordered”> <table class="pure-table-horizontal”> <table class="pure-table-striped”> *this won’t work in IE8 or lower as it uses the CSS3 nth-child selector 38 Pure – Riccardo Cocetta – www.purecss.io
  • 39. Modules Summary §  Pure is modular §  You can pick any module you want choosing from Name Base http://yui.yahooapis.com/pure/0.3.0/base-min.css Buttons http://yui.yahooapis.com/pure/0.3.0/buttons-min.css Forms (Responsive) http://yui.yahooapis.com/pure/0.3.0/forms-min.css Forms (Non-Responsive) http://yui.yahooapis.com/pure/0.3.0/forms-nr-min.css Grids (Responsive) http://yui.yahooapis.com/pure/0.3.0/grids-min.css Grids (Non-Responsive) http://yui.yahooapis.com/pure/0.3.0/grids-nr-min.css Menus (Responsive) http://yui.yahooapis.com/pure/0.3.0/menus-min.css Menus (Non-Responsive) http://yui.yahooapis.com/pure/0.3.0/menus-nr-min.css Tables 39 URL http://yui.yahooapis.com/pure/0.3.0/tables-min.css Pure – Riccardo Cocetta – www.purecss.io
  • 41. How do I get Pure? §  www.purecss.io is your first reference §  Download and link the rollup you want ›  Responsive •  http://yui.yahooapis.com/pure/0.3.0/pure-min.css ›  Non Responsive •  http://yui.yahooapis.com/pure/0.3.0/pure-nr-min.css §  Or download only the modules you need ›  ›  41 Yahoo CDN supports combo handling, so with 1 HTTP request you can get the modules you need http://yui.yahooapis.com/combo?pure/0.3.0/base-min.css&pure/0.3.0/gridsmin.css&pure/0.3.0/forms-min.css Pure – Riccardo Cocetta – www.purecss.io
  • 42. Predefined Layouts + Extensions §  Pure stays out of your way, but if you want… §  Layout examples from the Pure team for ›  Blog ›  E-Mail ›  Photo Gallery ›  Landing Page ›  Pricing table §  You can find them at http://purecss.io/layouts/ §  You can easily extend Pure with your own classes §  You can make it work with other frameworks such as Bootstrap 42 Pure – Riccardo Cocetta – www.purecss.io
  • 43. Online Tools + Contribute §  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 ›  ›  43 Pure is an open-source project under the BSD License. We welcome issues, pull requests, and feedback https://github.com/yui/pure/ Pure – Riccardo Cocetta – www.purecss.io
  • 44. Resources and references Resource 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 44 Reference www.netmarketshare.com Pure – Riccardo Cocetta – www.purecss.io