oocss and smacss case study

34
#iiofficeceb OOCSS and SMACSS Case Study

Upload: kota-fujishiro

Post on 13-Jan-2017

126 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: OOCSS and SMACSS Case Study

#iiofficecebu

OOCSS and SMACSSCase Study

Page 2: OOCSS and SMACSS Case Study

#iiofficecebu

KOTA FUJISHIROFront-end web developerTwitter:@fujineko_kotaFacebook:kota fujishiro

Page 3: OOCSS and SMACSS Case Study

#iiofficecebu

It is easy to write CSS codes.But , It is difficult to design CSS.

Page 4: OOCSS and SMACSS Case Study

#iiofficecebu

selector { property : value }

Page 5: OOCSS and SMACSS Case Study

#iiofficecebu

#main h2{ … }

#main .contact .header h2{ … }

#sidebar h2{ … }

#main #sidebar

Page 6: OOCSS and SMACSS Case Study

#iiofficecebu

#main h2 { … }#main .contact .header h2 { … }#sidebar h2 { … }.somewhere .title h2 { … }

In this case,the title h2 depends on the parent.It is not flexible or reusable.

Page 7: OOCSS and SMACSS Case Study

#iiofficecebu

1.Overwrite2.Copy and Paste3.!important

Page 8: OOCSS and SMACSS Case Study

#iiofficecebu

Overwrite

Page 9: OOCSS and SMACSS Case Study

#iiofficecebu

Copy and paste

Page 10: OOCSS and SMACSS Case Study

#iiofficecebu

!important

You will meet problems about the specificity

Page 11: OOCSS and SMACSS Case Study

#iiofficecebu

In the end , your source code will be messy.

Page 12: OOCSS and SMACSS Case Study

#iiofficecebu

Break into smaller partsand Follow the rule.

Page 13: OOCSS and SMACSS Case Study

#iiofficecebu

ITCSS

OOCSSSMACSS

BEM

SUITCSS

FLOCSS

AtomicCSS

Page 14: OOCSS and SMACSS Case Study

#iiofficecebu

OOCSSSMACSS

Object Oriented CSS

Scalable and Modular Architecture for css

Page 15: OOCSS and SMACSS Case Study

#iiofficecebu

OOCSS

Page 16: OOCSS and SMACSS Case Study

#iiofficecebu

What is the OOCSS?

Page 17: OOCSS and SMACSS Case Study

#iiofficecebu

Make a website with objectslike LEGO block.

Page 18: OOCSS and SMACSS Case Study

#iiofficecebu

Name each Objects

Page 19: OOCSS and SMACSS Case Study

#iiofficecebu

Make a website with objectslike LEGO block.

Page 20: OOCSS and SMACSS Case Study

#iiofficecebu

SMACSS

Page 21: OOCSS and SMACSS Case Study

#iiofficecebu

What is the SMACSS?

Page 22: OOCSS and SMACSS Case Study

#iiofficecebu

The main concept of SMACSS isto categorize CSS into 5 rules.

1.Base 2.Layout3.Module4.State5.Theme

Page 23: OOCSS and SMACSS Case Study

#iiofficecebu

Page 24: OOCSS and SMACSS Case Study

#iiofficecebu

Page 25: OOCSS and SMACSS Case Study

#iiofficecebu

BaseResect.css,Normalize.css …etc

Page 26: OOCSS and SMACSS Case Study

#iiofficecebu

Page 27: OOCSS and SMACSS Case Study

#iiofficecebu

LayoutOutline of modules

Page 28: OOCSS and SMACSS Case Study

#iiofficecebu

Page 29: OOCSS and SMACSS Case Study

#iiofficecebu

ModuleReusable parts.

State(is-hidden,is-active…etc)

Page 30: OOCSS and SMACSS Case Study

#iiofficecebu

Page 31: OOCSS and SMACSS Case Study

#iiofficecebu

Page 32: OOCSS and SMACSS Case Study

#iiofficecebu

Resources

github.com/kotafujishiro/SampleSite

OOCSSslideshare.net/stubbornella/object-oriented-css

SMACSSsmacss.com

Page 33: OOCSS and SMACSS Case Study

#iiofficecebu

Let’s create modular and scalable CSS

by using OOCSS and SMACSS

Page 34: OOCSS and SMACSS Case Study

#iiofficecebu

Thanks