Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Ricardo Vazquez @iamrvazquez

Slide 3

Slide 3 text

The most beautiful photography in the world. The most beautiful photography in the world.

Slide 4

Slide 4 text

design

Slide 5

Slide 5 text

design matters

Slide 6

Slide 6 text

design matters LOT a

Slide 7

Slide 7 text

TheGreat discontent

Slide 8

Slide 8 text

Design must be useful, aesthetic, discrete, lasting, useful. Most importantly, good design must be as little as possible.

Slide 9

Slide 9 text

WeARE DESIGNERS

Slide 10

Slide 10 text

WhO Code...

Slide 11

Slide 11 text

style.css

Slide 12

Slide 12 text

global.css

Slide 13

Slide 13 text

S e p a r a t e your CSS, or I’m coming after you.

Slide 14

Slide 14 text

bits.css typography.css layout.css footer.css ui.css modules.css global.css

Slide 15

Slide 15 text

@import ‘bits.css’ @import ‘ui.css’ @import ‘typography.css’

Slide 16

Slide 16 text

Wishful Thinking

Slide 17

Slide 17 text

Sass Me up

Slide 18

Slide 18 text

OMG WTH IS SASS?

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No.

Slide 21

Slide 21 text

Sass is an extension of CSS3 which adds nested rules, variables, mixins, selector inheritance, and more. Sass generates well formatted CSS and makes your stylesheets easier to organize and maintain.

Slide 22

Slide 22 text

A computer program that modifies data to conform with the input requirements of another program.

Slide 23

Slide 23 text

SASS

Slide 24

Slide 24 text

SASS CSS

Slide 25

Slide 25 text

CSS MAGIC SASS

Slide 26

Slide 26 text

THe OTHERS

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

I used to Drink the hard stuff

Slide 31

Slide 31 text

CSS can be Beautiful

Slide 32

Slide 32 text

Let’s get Started

Slide 33

Slide 33 text

Mod. ARCH. Variables Nesting Extend Mixins Functions IF ELSE each Compass UI/UX Smiles

Slide 34

Slide 34 text

GIFs

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Variables

Slide 37

Slide 37 text

$siteBg = #B9C1C7 $labelBg = #02ADEA $moduleClr = #AEAFB0

Slide 38

Slide 38 text

span display: inline-block background: $labelBg margin: 5px 5px 0 0

Slide 39

Slide 39 text

NESTING

Slide 40

Slide 40 text

.photo-details.active h4 .select { width: 236px; }

Slide 41

Slide 41 text

.photo-details display: none &.active display: block h4 color: $blue font-size: 14px font-family: $helvetica font-weight: bold text-transform: uppercase .select width: 236px

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

Don’t. Repeat. YOURSELF.

Slide 44

Slide 44 text

BE A Designer

Slide 45

Slide 45 text

v EXtending

Slide 46

Slide 46 text

v Abstract Classes or Placeholders %

Slide 47

Slide 47 text

%sidebar-box margin: 0 0 10px 0 background: $bg padding: 10px .sidebar-auth-box @extend %sidebar-box input[type=text] padding: 10px border: 1px solid #ccc

Slide 48

Slide 48 text

http://bit.ly/sass-extend

Slide 49

Slide 49 text

Simple, right?

Slide 50

Slide 50 text

MIXxxINS

Slide 51

Slide 51 text

Mixins output code instead of returning a result

Slide 52

Slide 52 text

@mixin underline-on-hover() text-decoration: none &:hover text-decoration: underline

Slide 53

Slide 53 text

=underline-on-hover( ) text-decoration: none &:hover text-decoration: underline

Slide 54

Slide 54 text

a:link color: $active background: $buttonBg padding: 5px 10px +underline-on-hover

Slide 55

Slide 55 text

String Interpolation in CSS?

Slide 56

Slide 56 text

HELL YES

Slide 57

Slide 57 text

=vendorize($property, $value) -webkit-#{$property}: $value -moz-#{$property}: $value -ms-#{$property}: $value -o-#{$property}: $value #{$property}: $value

Slide 58

Slide 58 text

+vendorize(appearance, none)

Slide 59

Slide 59 text

+vendorize(appearance, none) +vendorize(box-sizing, border-box)

Slide 60

Slide 60 text

v =group( ) &:before, &:after content: "\0020" display: block height: 0 overflow: hidden &:after clear: both

Slide 61

Slide 61 text

v Know what? We could have done that a better way.

Slide 62

Slide 62 text

v %clearfix:before, &:after content: "\0020" display: block height: 0 overflow: hidden &:after clear: both

Slide 63

Slide 63 text

v Boom

Slide 64

Slide 64 text

v CONTROL Directives

Slide 65

Slide 65 text

v FunctionS

Slide 66

Slide 66 text

v A function is very similar to a mixin, however the output from a function is a single value.

Slide 67

Slide 67 text

@function add($x, $y) @return $x + $y

Slide 68

Slide 68 text

v .my-module padding: add(10px, 5px)

Slide 69

Slide 69 text

.my-module padding: add(10px, 5px) @function add($x, $y) @return $x + $y ...

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

target / context = result

Slide 72

Slide 72 text

target / context = result 650px / 1000px = 65%

Slide 73

Slide 73 text

target / context = result 650px / 1000px = 65% @function calc-p($target, $container) @return ($target / $container) * 100%

Slide 74

Slide 74 text

target / context = result 650px / 1000px = 65% @function calc-p($target, $container) @return ($target / $container) * 100% .my-module width: calc-p(650px, 1000px)

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

Reusable LOGIC

Slide 77

Slide 77 text

There are functions for colour, too!

Slide 78

Slide 78 text

$base: #2c3e50 darken($base, 8%) lighten($base, 8%) saturate(%base, 20%) desaturate(%base, 20%) adjust-hue($base, 20%) rgba($base, .5) tint($base, 10%) shade($base, 10%)

Slide 79

Slide 79 text

http://bit.ly/sass-colour

Slide 80

Slide 80 text

IFELSE

Slide 81

Slide 81 text

The @if directive takes a condition to evaluate and returns the nested styles if the condition is truthy (not false or null). Specifying what to return if the condition is falsey can be done using the @else statement.

Slide 82

Slide 82 text

http://bit.ly/sass-ifelse

Slide 83

Slide 83 text

[at]EACH

Slide 84

Slide 84 text

The @each directive takes the form @each $var in $var can be any variable name, and is a SassScript expression that returns a list

Slide 85

Slide 85 text

http://bit.ly/sass-each

Slide 86

Slide 86 text

MEDIa Queries

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

Yes, media queries can actually be simple!

Slide 90

Slide 90 text

http://bit.ly/sass-media

Slide 91

Slide 91 text

Still, we shouldn’t be spending our time writing mixins and extending all over the place. There’s gotta be something better.

Slide 92

Slide 92 text

COMPASS i’m lost... get me a

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

@import "compass/css3/border-radius" @import "compass/css3/transition" @import "compass/css3/opacity" @import "compass/css3/box-shadow" @import "compass/css3/text-shadow"

Slide 95

Slide 95 text

+single-box-shadow (rgba(0,0,0,0.3),0px,1px, 3px,false,true)

Slide 96

Slide 96 text

ADMIT I Must

Slide 97

Slide 97 text

on UI A WORD and UX

Slide 98

Slide 98 text

Our vision is optimized to see structure Know your user State visualization Focus Help User testing Aesthetics

Slide 99

Slide 99 text

And LOGIC Emotion

Slide 100

Slide 100 text

Envision your users, and design logically; it will yield emotion if you let it breathe.

Slide 101

Slide 101 text

CSS is Modular

Slide 102

Slide 102 text

CSS is scalable

Slide 103

Slide 103 text

CSS is design

Slide 104

Slide 104 text

CSS is code

Slide 105

Slide 105 text

CSS is smart

Slide 106

Slide 106 text

CSS is not alone

Slide 107

Slide 107 text

READ!

Slide 108

Slide 108 text

CREATE!

Slide 109

Slide 109 text

SHARE!

Slide 110

Slide 110 text

Make OUR Community Better

Slide 111

Slide 111 text

CULL & Surrender

Slide 112

Slide 112 text

@iamrvazquez rvazquez.ca THANK YOU