Stop CSS - APICSS (English)

66
STOP CSS

description

APICSS is more style guide than rigid framework. There is no library within here for you to download or install. APICSS is a new way to help spread the Object-oriented CSS technique, and the answer from a CSS file to continue increasing in number of HTML pages.

Transcript of Stop CSS - APICSS (English)

Page 1: Stop CSS - APICSS (English)

STOP CSS

Page 2: Stop CSS - APICSS (English)

!WARNING

The following slides contain unconventional ideas that may be disturbing to some conservative viewers.

Page 3: Stop CSS - APICSS (English)

To the people who want to stop

writing CSS any more.

Page 4: Stop CSS - APICSS (English)

Introducing the APICSS

Page 5: Stop CSS - APICSS (English)

What is it?

APICSS is more style guide than rigid framework. There is no library within here for you to download or install. APICSS is a new way to help spread the Object-oriented CSS

technique, and the answer from a CSS file to continue increasing in number of HTML pages.

Page 6: Stop CSS - APICSS (English)

People don't like CSS for good reason.

Page 7: Stop CSS - APICSS (English)

More Page

More Design

More CSS

Hard to organize

Failed

Page 8: Stop CSS - APICSS (English)

More Page

More Design

More CSS

Hard to organize

Failed

☜ Stop here

Page 9: Stop CSS - APICSS (English)

More Page

More Design

More CSS

Hard to organize

Failed

☜ Better stop here

Page 10: Stop CSS - APICSS (English)

You can stop.

Page 11: Stop CSS - APICSS (English)

How ?

Page 12: Stop CSS - APICSS (English)

BEM ?Block, Element and Modifier

Page 13: Stop CSS - APICSS (English)

NoSorry, BEMer.

Page 14: Stop CSS - APICSS (English)

OOCSS × SMACSSObject Oriented CSS × Scalable and Modular Architecture CSS

Page 15: Stop CSS - APICSS (English)

Name is

Page 16: Stop CSS - APICSS (English)

APICSSCSS meets API

Page 17: Stop CSS - APICSS (English)

Use CSS as API that rarely modified.

Page 18: Stop CSS - APICSS (English)

10 CSS files help to make

OOCSS happen for real.

Page 19: Stop CSS - APICSS (English)

@import1. variables

2. fonts

3. normalize

4. elements

5. forms

6. icons

7. objects

8. components

9. containers

10. utilities

Page 20: Stop CSS - APICSS (English)

@import1. variables

2. fonts

3. normalize

4. elements

5. forms

6. icons

7. objects

8. components

9. containers

10. utilities

Use these CSS as filters. You shouldn't modify existing classes. But you can add new lines.

Page 21: Stop CSS - APICSS (English)

@import1. variables

2. fonts

3. normalize

4. elements

5. forms

6. icons

7. objects

8. components

9. containers

10. utilities

11. uncommon

Use these CSS as filters. You shouldn't modify existing classes. But you can add new lines.

Page 22: Stop CSS - APICSS (English)

@import1. variables

2. fonts

3. normalize

4. elements

5. forms

6. icons

7. objects

8. components

9. containers

10. utilities

11. uncommon Use this unless you can provide styles with above.

Use these CSS as filters. You shouldn't modify existing classes. But you can add new lines.

Page 23: Stop CSS - APICSS (English)

The Goal is nothing to add on CSS;

because you have enough already.

Page 24: Stop CSS - APICSS (English)

But why we haven't achieve yet?

Page 25: Stop CSS - APICSS (English)

Failed example of Bootstrap

Page 26: Stop CSS - APICSS (English)

Failed example of Bootstrap

div class="alert alert-info"

Page 27: Stop CSS - APICSS (English)

Failed example of Bootstrap

div class="alert alert-info"

div class="alert alert-danger"

Page 28: Stop CSS - APICSS (English)

Failed example of Bootstrap

• Designs are so limited. People want more flexibility and variety.

• You can't pull the container style and the content style separately.

• Class name contains ''context'' that makes hard to use for different purpose.

Page 29: Stop CSS - APICSS (English)

Failed example of Bootstrap

• Designs are so limited. People want more flexibility and variety.

• You can't pull the container style and the content style separately.

• Class name contains ''context'' that makes hard to use for different purpose.

Page 30: Stop CSS - APICSS (English)

Failed example of Bootstrap

• Designs are so limited. People want more flexibility and variety.

• You can't pull the container style and the content style separately.

• Class name contains ''context'' that makes hard to use for different purpose.

Page 31: Stop CSS - APICSS (English)

Failed example of Bootstrap

• Designs are so limited. People want more flexibility and variety.

• You can't pull the container style and the content style separately.

• Class name contains ''context'' that makes hard to use for different purpose.

Page 32: Stop CSS - APICSS (English)

Failed example of Bootstrap

div class="alert alert-danger"

This context.

Page 33: Stop CSS - APICSS (English)

!WARNING

Here's the thing.

Page 34: Stop CSS - APICSS (English)

Traditional approach

div class="alert alert-danger"

Page 35: Stop CSS - APICSS (English)

APICSS approach

div class="roundedbox roundedbox-red padding-15px" span class="color-red"

Page 36: Stop CSS - APICSS (English)

Textbook says ...

Page 37: Stop CSS - APICSS (English)

Textbook says ...

Bad .color-red { color: red; }

Good .color-caution { color: red; }

Page 38: Stop CSS - APICSS (English)

‒ Textbook

''Class name should contain a semantic phrase

to prepare for changing the style in the future.''

Page 39: Stop CSS - APICSS (English)

‒ Textbook

''Class name should contain a semantic phrase

to prepare for changing the style in the future.''

Page 40: Stop CSS - APICSS (English)

‒ Textbook

''Class name should contain a semantic phrase

to prepare for changing the style in the future.''

Failed

Page 41: Stop CSS - APICSS (English)

CSS HTML

Page 42: Stop CSS - APICSS (English)

One Many

Page 43: Stop CSS - APICSS (English)

Fixing CSS effects a lot of HTML.

Sometimes it's dangerous.

Page 44: Stop CSS - APICSS (English)

More Page

More Design

More CSS

Hard to organize

Failed

Page 45: Stop CSS - APICSS (English)

Case of APICSS

Page 46: Stop CSS - APICSS (English)

Change design to modify HTML not CSS.

Page 47: Stop CSS - APICSS (English)

Before

div class="roundedbox roundedbox-red padding-15px" span class="color-red"

Page 48: Stop CSS - APICSS (English)

After

div class="roundedbox roundedbox-blue padding-15px" span class="color-red"

Page 49: Stop CSS - APICSS (English)

You can check the result by sight.

Page 50: Stop CSS - APICSS (English)

Also you can replace multiple HTML files at once.

Page 51: Stop CSS - APICSS (English)

Good .color-red { color: red; }

Bad .color-caution { color: red; }

Page 52: Stop CSS - APICSS (English)

‒ APICSS rule

''Class name should be based on their own properties

to prepare for using whatever purpose in the future.''

Page 53: Stop CSS - APICSS (English)

‒ APICSS rule

''Class name should be based on their own properties

to prepare for using whatever purpose in the future.''

Page 54: Stop CSS - APICSS (English)

‒ APICSS rule

''Class name should be based on their own properties

to prepare for using whatever purpose in the future.''

It works

Page 55: Stop CSS - APICSS (English)

Good .color-red { color: $red; }

Good .color-yellow { color: $yellow; }

Good .color-lightblue { color: $lightblue; }

Good .font-monospace { font-family: $monospace; }

Good .font-serif { font-family: $serif; }

Good .font-sanserif { font-family: $san-serif; }

Page 56: Stop CSS - APICSS (English)

Result

Dramatically reduced the frequency

of touching CSS.

Page 57: Stop CSS - APICSS (English)

APICSSCSS meets API

Page 58: Stop CSS - APICSS (English)

OOCSS × SMACSSObject Oriented CSS × Scalable and Modular Architecture CSS

Page 59: Stop CSS - APICSS (English)

STOP CSS

Page 60: Stop CSS - APICSS (English)

Conclusion

Page 61: Stop CSS - APICSS (English)

Conclusion

• It's a new way to stop CSS in hundreds of HTML.

• Distributed writing method for each 11 files.

• You shouldn't modify existing classes.

• Class name is based on properties not purpose.

Page 62: Stop CSS - APICSS (English)

Tips

Page 63: Stop CSS - APICSS (English)

Tips

• Do implement design elements separately for you can pull these separately.

• Related classes must have same prefix like SMACSS for easy organizing.

• Avoid using background image as possible.

Page 64: Stop CSS - APICSS (English)

Thank you.

Page 65: Stop CSS - APICSS (English)

byodkm.com/apicss

Page 66: Stop CSS - APICSS (English)

Copyright 2013 @tomohiro_kasuga. All right reserved.