lessons learned from building your own css framework

31
Lessons Learned From Building Your Own CSS Framework Charlie Owen @sonniesedge

Upload: sonniesedge

Post on 13-Apr-2017

30 views

Category:

Presentations & Public Speaking


0 download

TRANSCRIPT

Page 1: Lessons Learned From Building Your Own CSS Framework

Lessons Learned From Building Your Own CSS

FrameworkCharlie Owen

@sonniesedge

Page 2: Lessons Learned From Building Your Own CSS Framework

Who the hell am I?

@sonniesedge

Page 3: Lessons Learned From Building Your Own CSS Framework
Page 4: Lessons Learned From Building Your Own CSS Framework
Page 5: Lessons Learned From Building Your Own CSS Framework
Page 6: Lessons Learned From Building Your Own CSS Framework

So, what is a CSS framework?

@sonniesedge

Page 7: Lessons Learned From Building Your Own CSS Framework

Kinda like Bootstrap…?

http://getbootstrap.com/@sonniesedge

Page 8: Lessons Learned From Building Your Own CSS Framework

Maybe more like Bourbon..?

http://bourbon.io/@sonniesedge

Page 9: Lessons Learned From Building Your Own CSS Framework

Maybe it’s something… in-between?

@sonniesedge

Page 10: Lessons Learned From Building Your Own CSS Framework

Loom frameworkhttps://github.com/sonniesedge/loom

@sonniesedge

Page 11: Lessons Learned From Building Your Own CSS Framework

How does it work?

@sonniesedge

Page 12: Lessons Learned From Building Your Own CSS Framework

Make variables enforce your design system

@sonniesedge

Page 13: Lessons Learned From Building Your Own CSS Framework

margin-left: get-spacing(large)

@sonniesedge

Page 14: Lessons Learned From Building Your Own CSS Framework

ITCSS prevents specificity wars

@sonniesedge

Page 15: Lessons Learned From Building Your Own CSS Framework

@sonniesedge

Page 16: Lessons Learned From Building Your Own CSS Framework

Simple, non-nested classes

@sonniesedge

Page 17: Lessons Learned From Building Your Own CSS Framework

@sonniesedge

Page 18: Lessons Learned From Building Your Own CSS Framework

Why build it?

@sonniesedge

Page 19: Lessons Learned From Building Your Own CSS Framework

What did I learn from building Loom?

@sonniesedge

Page 20: Lessons Learned From Building Your Own CSS Framework

Set an achievable aim.

@sonniesedge

Page 21: Lessons Learned From Building Your Own CSS Framework

Be opinionated. Be proud.

@sonniesedge

Page 22: Lessons Learned From Building Your Own CSS Framework

@sonniesedge

Page 23: Lessons Learned From Building Your Own CSS Framework

Don't be too rigid

@sonniesedge

Page 24: Lessons Learned From Building Your Own CSS Framework

Learn from other people’s work

@sonniesedge

Page 25: Lessons Learned From Building Your Own CSS Framework

Don't over-engineer

@sonniesedge

Page 26: Lessons Learned From Building Your Own CSS Framework

@mixin padding($args) {...// allow for processing of various combos of

arguments....// it goes on forever.........@return $padding-values;

}

@sonniesedge

Page 27: Lessons Learned From Building Your Own CSS Framework

.selector { padding: 1rem 0.5rem;}

@sonniesedge

Page 28: Lessons Learned From Building Your Own CSS Framework

Don't prematurely optimise

@sonniesedge

Page 29: Lessons Learned From Building Your Own CSS Framework

Documentation is amazing

@sonniesedge

Page 30: Lessons Learned From Building Your Own CSS Framework

Get a good name

@sonniesedge

Page 31: Lessons Learned From Building Your Own CSS Framework

Charlie Owen@sonniesedge

http://sonniesedge.co.ukhttps://github.com/sonniesedge