add some awesome-sauce

41

Upload: davist11

Post on 16-Jan-2015

2.482 views

Category:

Design


0 download

DESCRIPTION

Presentation to Clarksburg High School students with supporting demo site: http://hp.trevordavis.net

TRANSCRIPT

Page 1: Add Some Awesome-Sauce
Page 2: Add Some Awesome-Sauce

ADD SOMEAWESOME-SAUCE

Trevor Davis05.06.2011

Page 3: Add Some Awesome-Sauce

WHAT DO I DO?‣ Flat designs to interactive sites

‣ HTML

‣ CSS

‣ JavaScript

Page 4: Add Some Awesome-Sauce

HTML5 & CSS3

Page 5: Add Some Awesome-Sauce

WHAT WE'LL COVER‣ Doctype

‣ Elements

‣ Selectors

‣ Properties

‣ Values

Page 6: Add Some Awesome-Sauce

PROGRESSIVE ENRICHMENT

Page 7: Add Some Awesome-Sauce

DEGRADATION‣ Not everything is supported in every browser

‣ That's ok

‣ Provide fallbacks

Page 8: Add Some Awesome-Sauce

PREFIXES

Page 9: Add Some Awesome-Sauce

PREFIXES.something { -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px;}

Page 10: Add Some Awesome-Sauce

HTML5

Page 11: Add Some Awesome-Sauce

DOCTYPE

Page 13: Add Some Awesome-Sauce

GROSS

Page 14: Add Some Awesome-Sauce

HTML5 DOCTYPE<!DOCTYPE html>

Page 15: Add Some Awesome-Sauce

ELEMENTS

Page 16: Add Some Awesome-Sauce

SOOOO MANY‣ section

‣ article

‣ aside

‣ hgroup

‣ header

‣ footer

‣ nav

‣ figure

‣ figcaption

‣ video

‣ audio

‣ mark

‣ progress

‣ meter

‣ time

‣ canvas

‣ datalist

‣ and more…

Page 17: Add Some Awesome-Sauce

LET'S LOOK AT THESE 3‣ header

‣ section

‣ video

Page 18: Add Some Awesome-Sauce

HTML5 VIDEO FORMATS‣ mp4

‣ webm

‣ ogg

‣ Dive into HTML5

Page 19: Add Some Awesome-Sauce

CSS3

Page 20: Add Some Awesome-Sauce

SELECTORS

Page 21: Add Some Awesome-Sauce

AGAIN, SOOOO MANY‣ E[foo^="bar"]

‣ E[foo$="bar"]

‣ E[foo*="bar"]

‣ E:root

‣ E:nth-child(n)

‣ E:nth-last-child(n)

‣ E:last-child

‣ E:first-of-type

‣ E:last-of-type

‣ E:only-child

‣ E:empty

‣ and more…

Page 22: Add Some Awesome-Sauce

LET'S LOOK AT THESE 3‣ E:first-child

‣ E:last-child

‣ E:nth-child(n)

Page 23: Add Some Awesome-Sauce

PROPERTIES

Page 24: Add Some Awesome-Sauce

A WHOLE BUNCH‣ border-radius

‣ border-image

‣ box-shadow

‣ background-size

‣ multiple backgrounds

‣ background-size

‣ text-shadow

‣ animations

‣ transforms

‣ transitions

‣ opacity

‣ and more…

Page 25: Add Some Awesome-Sauce

TEXT SHADOWtext-shadow: 1px 1px 1px #fff

text-shadow: x y blur color

Page 26: Add Some Awesome-Sauce

BORDER RADIUSborder-radius: 5px

border-radius: length

Page 27: Add Some Awesome-Sauce

BOX SHADOWbox-shadow: inset 0 0 5px #000

box-shadow: inset x y blur spread color

Page 28: Add Some Awesome-Sauce

OPACITYopacity: 0.5

opacity: alphavalue

Page 29: Add Some Awesome-Sauce

TRANSFORMtransform: transform-function

transform: rotate(60deg)

matrix, translate, translateX, translateY, scale, scaleX, scaleY, rotate, skew, skewX, skewY

Transform builder

Page 30: Add Some Awesome-Sauce

TRANSITIONtransition: all 2.5s ease-in-out 2s

transition: property duration timing-function delay

Ceasar

Page 31: Add Some Awesome-Sauce

ANIMATIONanimation: fly 4.5s linear infinite

animation: name duration timing-function delay count direction

Page 32: Add Some Awesome-Sauce

VALUES

Page 33: Add Some Awesome-Sauce

LET'S JUST LOOK AT THESE‣ font-face

‣ rgba

‣ gradients

Page 34: Add Some Awesome-Sauce

FONT FACE@font-face { font-family: 'ArvoItalic'; src: url('/fonts/arvo-italic-webfont.eot'); src: url('/fonts/arvo-italic-webfont.eot?iefix') format('eot'), url('/fonts/arvo-italic-webfont.woff') format('woff'), url('/fonts/arvo-italic-webfont.ttf') format('truetype'), url('/fonts/arvo-italic-webfont.svg#webfontCl4HytEc') format('svg'); font-weight: normal; font-style: normal;}

Page 35: Add Some Awesome-Sauce

RGBAcolor: rgba(0, 0, 0, 0.5)

color: rgba(red, green, blue, alpha)

Page 36: Add Some Awesome-Sauce

GRADIENTSbackground: -moz-linear-gradient(top, #f8f0e1 0%, #eddab7 100%)

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f0e1), color-stop(100%,#eddab7))

Page 37: Add Some Awesome-Sauce

GRADIENT SYNTAX-moz-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>])

-webkit-linear-gradient([<point> || <angle>,]? <stop>, <stop> [, <stop>]);

Gradient generator

Page 38: Add Some Awesome-Sauce

RANDOM CSS TIPS

Page 39: Add Some Awesome-Sauce

RANDOM CSS TIPS‣ Create a baseline

‣ Alphabetize properties

‣ Comment grouping

‣ Don't touch CSS until your HTML is solid

Page 40: Add Some Awesome-Sauce

QUESTIONS?

Page 41: Add Some Awesome-Sauce

THANKS!‣ My Site: http://trevordavis.net

‣ Twitter: @trevor_davis

‣ Source: https://github.com/davist11/HP-Demo

‣ Demo: http://hp.trevordavis.net