jina bolton

81
3 JINA BOLTON http://creatingsexystylesheets.com /

Upload: carsonified-team

Post on 19-Jun-2015

16.928 views

Category:

Business


2 download

DESCRIPTION

CSS3 And What Could Be

TRANSCRIPT

Page 1: Jina Bolton

3JINA BOLTON

http://creatingsexystylesheets.com/

Page 2: Jina Bolton
Page 3: Jina Bolton

by Cameron Adams

Jina Bolton

David Johnson

Steve Smith

Jonathan Snook

Published by SitePoint

The Art & Science of css

Page 4: Jina Bolton

css3

Page 5: Jina Bolton

“css 3

A Giant Servingof FAIL!

— alex russellhttp://alex.dojotoolkit.org/?p=625

Page 6: Jina Bolton

“css 3

"Third Time Lucky#!— andy clarke

Page 7: Jina Bolton

css 1 1996

Page 8: Jina Bolton

css 2 1997

Page 9: Jina Bolton

candidate recommendationcss 2.1

Page 10: Jina Bolton

css 3 modul!

Page 11: Jina Bolton

Sele$orsMulti%columnLayout

GridPositioning

AdvancedLayoutMedia

Queries

Backgrounds& Borders

Page 12: Jina Bolton

Style any box&s borders and background including attach multiple background%images to a single element.

Backgrounds& Borders

Page 13: Jina Bolton

Backgrounds & Borders

%border-radius

%border-break

%border-image

%box-shadow

Page 14: Jina Bolton
Page 15: Jina Bolton

<div class="vcard">

<div class="addr-bl">

<div class="addr-tr">

</div>

</div>

</div>

Page 16: Jina Bolton

.vcard {

background:

#000

url(a-grad.gif)

repeat-x;

}

.addr-bl {

background:

url(a-bl.gif)

100% 0

no-repeat;

}

.addr-tr {

background:

url(a-tr.gif)

100% 0

no-repeat;

}

Page 17: Jina Bolton

<div class="vcard">…</div>

Page 18: Jina Bolton

.vcard {

background-color: #000;

background-image:

url(a-grad.gif),

url(a-bl.gif),

url(a-tr.gif);

background-repeat:

repeat-x,

no-repeat,

no-repeat;

background-position:

0 0,

100% 0,

0 100%;

}

Page 19: Jina Bolton
Page 20: Jina Bolton
Page 21: Jina Bolton
Page 22: Jina Bolton
Page 23: Jina Bolton
Page 24: Jina Bolton
Page 25: Jina Bolton
Page 26: Jina Bolton

Making it simpler to create column layouts without additional markup by using column widths, counts, gaps and rules.

Multi%column Layout

Page 27: Jina Bolton
Page 28: Jina Bolton
Page 29: Jina Bolton

<div class="entry-content">

<div class="col first">

</div>

<div class="col">

</div>

</div>

Page 30: Jina Bolton

.entry-content .col {

float: left;

width: 467px;

margin-left: 30px;

}

.entry-content .first {

margin-left: 0;

}

/* .entry-content

clear-fix rules */

Page 31: Jina Bolton

<div class="entry-content">

</div>

.entry-content {

column-count: 2;

column-gap: 30px;

}

Page 32: Jina Bolton
Page 33: Jina Bolton

<div class="entry-content">

</div>

.entry-content {

column-width: 270px;

column-gap: 30px;

}

Page 34: Jina Bolton

<div class="vcard">…</div>

.vcard {

border-image:

url("border.png")

30 30 30 30

stretch;

border:

double green 1em;

}

Page 35: Jina Bolton

Aims to fully separate visual layout order from a document&s content by de'ning (slots! in a grid in which content can )ow or be placed, or that remain empty * all without additional markup.

Advanced Layout

Page 36: Jina Bolton
Page 37: Jina Bolton

a b c d

e f g h

i j k l

Page 38: Jina Bolton

a a c d

e e g g

i j k l

Page 39: Jina Bolton
Page 40: Jina Bolton
Page 41: Jina Bolton

@ @ . .

e @ @ h

. j j l

Page 42: Jina Bolton

Gives the ability to add invisible grid rules to create grid layouts "like in books and newspapers#, and uses sizing and new )oat properties for placing content.

Grid Positioning

Page 43: Jina Bolton
Page 44: Jina Bolton
Page 45: Jina Bolton

<div class="entry-content">

</div>

.entry-content {

column-count: 4;

column-gap: 30px;

}

Page 46: Jina Bolton
Page 47: Jina Bolton

.entry-content {

grid-columns:

(30px * *)[4];

column-count: 4;

column-gap: 30px;

}

Page 48: Jina Bolton
Page 49: Jina Bolton

.entry-content {

grid-columns:

(30px * *)[4];

grid-rows:

9em 33.3% *;

column-count: 4;

column-gap: 30px;

}

Page 50: Jina Bolton
Page 51: Jina Bolton

<div class="entry-content">

<img src="sushi.jpg"

class="photo"

alt="" />

</div>

Page 52: Jina Bolton

.entry-content img.photo {

float: page bottom left;

float-offset: 4gr 1gr;

}

Page 53: Jina Bolton
Page 54: Jina Bolton

<div class="entry-content">

<h2>What is Sushi?</h2>

<img src="sushi.jpg"

class="photo"

alt="" />

</div>

Page 55: Jina Bolton

ic

.entry-content h2 {

float: page top left;

width: 6gr;

height: 1gr;

margin-left: -30px;

}

.entry-content img.photo {

float: page bottom left;

float-offset: 4gr 1gr;

}

Page 56: Jina Bolton

Re'ned sele$ors to target an element based on an attribute or position in the document )ow plus new pseudo%classes and pseudo%elements.

Sele$ors

Page 57: Jina Bolton

Sele$ors

%E:only-of-typean element which is the only sibling of its type

%E:not(s)an element that d+s not match simple sele$ors

%E ~ Fan F element preceded by an E element

Page 58: Jina Bolton

an element which is the n%th child of its parent

E:nth-child(n)

Sele$ors

Page 59: Jina Bolton
Page 60: Jina Bolton
Page 61: Jina Bolton

<tr class="alt"></tr>

<tr></tr>

tr.alt td {

background: #ecffd9;

}

Page 62: Jina Bolton

<tr></tr>

tr:nth-child(odd) td {

background: #ecffd9;

}

Page 63: Jina Bolton
Page 64: Jina Bolton

<tr class="high-rank">…</tr>

<tr class="high-rank">…</tr>

<tr class="high-rank">…</tr>

<tr>…</tr>

tr.high-rank td {

background: #ecffd9;

}

Page 65: Jina Bolton

<tr>…</tr>

tr:nth-child(-n+3) td {

background: #ecffd9;

}

Page 66: Jina Bolton

an element which is the n%th child of its parent, counting from the la, one

E:nth-last-child(n)

Sele$ors

Page 67: Jina Bolton
Page 68: Jina Bolton

<tr>…</tr>

<tr class="low-rank">…</tr>

<tr class="low-rank">…</tr>

<tr class="low-rank">…</tr>

tr.low-rank td {

opacity: .75;

}

Page 69: Jina Bolton

<tr>…</tr>

tr:nth-last-child(-n+2) td {

opacity: .75;

}

Page 70: Jina Bolton

an element which is the n%th sibling of its type

E:nth-of-type(n)

Sele$ors

Page 71: Jina Bolton
Page 72: Jina Bolton
Page 73: Jina Bolton

<p class="intro">…</p>

<p>…</p>

p.intro {

background: #fafcf5;

font-size: 1.3em;

color: #060;

}

Page 74: Jina Bolton

<p>…</p>

p:first-of-type {

background: #fafcf5;

font-size: 1.3em;

color: #030;

}

Page 75: Jina Bolton

Extending the usefulness of media types in combination with window widths, heights and aspe$ ratio.

Media Queries

Page 76: Jina Bolton

Resources

Page 77: Jina Bolton

CSS ELEVEN IS AN INTERNATIONAL GROUP OF VISUAL WEB DESIGNERS AND DEVELOPERS WHO ARE COMMITTED TO

HELPING THE W3C'S CSS WORKING GROUP TO BETTER DELIVER THE TOOLS THAT ARE NEEDED TO DESIGN TOMORROW'S WEB.

Page 78: Jina Bolton

Resources

%w3c Introdu$ion to css 3w3.org/TR/css3-roadmap

%css Working Group Blogw3.org/blog/CSS

%456 Berea Street456bereastreet.com

%css3.info

Page 79: Jina Bolton

Resources

%A Li, Apartalistapart.com

%Transcending css Supporttranscendingcss.com/support/

Page 80: Jina Bolton

creatingsexy,ylesheets.com

Page 81: Jina Bolton

Q&A