+ All Categories
Home > Documents > Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A...

Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A...

Date post: 28-May-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
63
Hello, I’m Patrick Fulton. Front End Developer at Bearded. 1 @patrickfulton @beardedstudio
Transcript
Page 1: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Hello, I’m Patrick Fulton. Front End Developer at Bearded.

1

!

@patrickfulton @beardedstudio

Page 2: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

2 https://flic.kr/p/7iMvus

Page 3: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

3 https://flic.kr/p/arGPzM

Page 4: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

4

Page 5: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

5

Page 6: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

6

Page 7: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

7

Page 8: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

8

Page 9: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

9

Page 10: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind to Your Future Self

10

Page 11: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

How?

• Build a “Starter Kit” • Code Reviews • Iterate, Fix Bugs, Iterate…

11

Page 12: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Start Building That Starter Kit!

12

• Sinatra (what Bearded currently uses)

• Middleman

• Assemble

• Jekyll

• http://staticsitegenerators.net/

• Plain, old HTML, CSS and JS (ala HTML5 Boilerplate)

• Google’s Web Starter Kit (http://bit.ly/1nRqAHc)

Page 13: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

LOL WUT?

13

Page 14: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

What Are We Repeating?

14

Page 15: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

What Are We Repeating?

15

Page 16: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Think Modularly

16

Page 17: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Think Modularly

“Atomic design is a methodology used to construct web design systems.”

!http://patternlab.io

17

Page 18: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Atoms

18

Page 19: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Molecules

19

Page 20: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Organisms

20

Page 21: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

How’s Your Flow?

21

https://www.aahomecare.org/

Page 22: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Think Modularly

22

Page 23: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Think Modularly

23

Page 24: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Code Modularly

24

<section id="membership"> <h2 class="block-heading">Membership</h2> <div class="membership-info"> <h2 class="title">Become a Member</h2> <p>Start enjoying the benefits of being an AAHomecare member today.</p> <span class="rule"></span> </div> <div class="membership-links"> <a class="button" href="/membership/join">Join AAHomecare</a> <ul> <li><a href="/membership/benefits">Benefits of Membership</a></li> <li><a href="/membership/join">Types of Membership</a></li> </ul> </div> </section>

Page 25: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

A Class By Any Other Name…

25

.field-name-field-webinar-sources,

.views-field-field-global-authors,

.field-name-field-global-person-name,

.field-name-field-magazine-feature,

.views-field-created,

.views-field-field-global-state,

.field-name-field-global-location,

.field-name-field-global-date,

.views-field-field-global-date,

.group-teaser-subtitle,

.field-name-field-global-company,

.field-name-field-global-email-address,

.field-name-field-global-organization,

.field-name-field-conf-venues,

.views-field-field-course-type,

.field-name-field-techpresentation-source,

.field-name-field-global-authors,

.field-name-field-global-person-profile,

.field-name-field-global-people-collected { @include subtle-text; a { @include subtle-link; } .field-label { color: $heading-color; font-size: inherit; } }

Page 26: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

A Class By Any Other Name…

26

.attribution { @include subtle-text; a { @include subtle-link; } .field-label { color: $heading-color; font-size: inherit; } }

Page 27: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Further Abstraction

27

Page 28: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Preprocessors

28

Page 29: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Variables, Mixins, Functions, Math

29

Page 30: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Mixins

30

@mixin button { padding: 0.5em 1em; text-decoration: none; color: $background-color; background-color: $link-color; @include border-radius(4px); &:hover, &:focus { text-decoration: none; background-color: $link-color-hover; } }

Page 31: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Variables

31

$text-color: #888; $heading-color: $text-color; $text-color-subtle: lighten($text-color, 30%); !$link-color: #555; $link-color-hover: darken($link-color, 15%); !$highlight-color: #333; $highlight-color-hover: darken($highlight-color, 15%); !$border-color: #ccc; !$background-color: #fff; $background-color-subtle: #eee; !$footer-color: $link-color;

Page 32: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Grid System

32

$gutter_width: 3.5%; $columns: 12; $column_width: 5.125%; $grid_width: ((($column_width+($gutter_width))*$columns)-$gutter_width); !@mixin container($max-width: 81.25em) { width: $grid_width; margin: auto; max-width: $max-width; *zoom: 1; } !@function column_width($num) { @return ($num * $column_width) + (($num - 1) * ($gutter_width)); } !

Page 33: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Let’s Get Organized

33

Page 34: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Partials

34

@import "lib/colors"; @import "lib/grid"; @import "lib/mediaqueries"; @import "lib/typographic-mixins"; @import "lib/general-mixins"; @import "lib/icons"; !@import "general"; @import "forms"; @import "header"; @import "footer"; @import "homepage"; @import "haunts"; @import "internal"; @import "notifications"; @import "secondary-navigation"; @import "reviews";

Page 35: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Let’s Get Organized

“Clean Out Your Sass Junk Drawer” http://bit.ly/RVzto0

http://youtu.be/EmNcD3b3ZtI !

!

See it in action: Toadstool http://bit.ly/1nQmKwX

35

Page 36: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Media Queries and Sass

36

Page 37: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Media Queries: Old Way

37

@media only screen and (min-width: 425px) { @import "layout/small"; } !@media only screen and (min-width: 600px) { @import "layout/medium"; } !@media only screen and (min-width: 900px) { @import "layout/large"; } !@media only screen and (min-width: 1100px) { @import "layout/large-xl"; } !@media only screen and (min-width: 1200px) { @import "layout/huge"; }

Page 38: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Breakpoint

38

Page 39: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Breakpoint: Variables

39

// media query variables (for breakpoint) !// tell Breakpoint to convert px values to em values $breakpoint-to-ems: true; !$bp-s: 400px; $bp-m: 600px; $bp-l: 800px; $bp-xl: 960px; $bp-xxl: 1100px;

Page 40: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Media Queries with Breakpoint

40

.container { @include container; width: 95%; padding: 0 2.5%; ! @include breakpoint($bp-s) { width: 90%; padding: 0 5%; } @include breakpoint($bp-l) { width: 95%; padding: 0 2.5%; } @include breakpoint($bp-xl) { width: 100%; padding: 0; } }

Page 41: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Media Queries with Breakpoint

41

.primary { margin: 0 auto; width: 90%; @include breakpoint($bp-m) { float: left; margin-right: 3.5%; width: 65%; } } !.sidebar { margin: 0 auto; width: 90%; @include breakpoint($bp-m) { border-left: 1px #ccc solid; float: left; padding-left: 2em; width: 25%; } }

Page 42: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Breakpoint: Compiled CSS

42

.primary { margin: 0 auto; width: 90%; } !@media (min-width: 37.5em) { .primary { float: left; margin-right: 3.5%; width: 65%; } } !.sidebar { margin: 0 auto; width: 90%; } !@media (min-width: 37.5em) { .sidebar { border-left: 1px #ccc solid; float: left; padding-left: 2em; width: 25%; } }

Page 43: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

What About Older Browsers (IE)?

43

Page 44: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

DisclaimerWe serve a “fixed-width” experience to versions < IE9.

44

Page 45: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Google’s Web Starter Kit

45

http://bit.ly/1nRqAHc

Page 46: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Google’s Web Starter Kit

46

• RWD-ready

• Living Style Guide

• LiveReload

• Built-in Server

• Sass support

• Performance optimization & PageSpeed Insights

• Cross-device synchronization

Page 47: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Code Reviews

47

Page 48: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

There Is No Prfectt

48

Page 49: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Fix Bugs & Iterate

49

Page 50: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Iterate, Iterate, Iterate

50

Page 51: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

HTML & CSS Wireframes

51

Page 52: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

HTML & CSS Wireframes

52

Page 53: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

HTML & CSS Interactive Mockups

53

Page 54: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

HTML & CSS Interactive Mockups

pghtrip.org54

Page 55: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Styleguides

http://bit.ly/1pCqWoX

55

Page 56: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Styleguides• KSS • Styledocco • Hologram • Roll Your Own

56

Page 57: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Hand-offs

57

Page 58: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Hand-offs• Need the code? HTML, CSS, and JS are ready to go!

• Does the client have an internal team? Train them.

• Document, document, document...

58

Page 59: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

The Internet Is Your Friend• Listen • Share • Adapt • Repeat

59

Page 60: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

The Internet Is Your Friend

60

Page 61: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Let’s Move The Web Forward

61

Page 62: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Be Kind

62

Page 63: Hello, I’m Patrick Fulton.environmentsforhumans.com/2014/css-summit/presentations/Fulto… · A Class By Any Other Name… 25.field-name-field-webinar-sources, .views-field-field-global-authors,

Thank you! !

@patrickfulton @beardedstudio

63


Recommended