25
1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

Embed Size (px)

Citation preview

Page 1: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

1

CSS-PREPROCESSORSas a way to speed upthe process of interfaces developingand achieve Customer goalsDMITRY SHURSHILIN

AUGUST 3, 2015

Page 2: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

2

ABOUT CSS

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language.

Page 3: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

3

ABOUT CSS

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language.

Page 4: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

4

ABOUT CSS

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language.

Weaknesses• Lack of basic features• Hard to maintain• Not DRY enough — leads to mistakes• @import — leads to many http-requests

Wishes• Variables, nesting, color operations• Reuse• @import

Page 5: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

5

THE MOST POPULAR CSS-PREPROCESSORS

Page 6: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

6

WHY USING PREPROCESSORS COULD BE USEFUL?

Convenience1

Performance2

Cross-browser support3

Maintenance4

Free frameworks and libraries5

Page 7: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

7

1. Variables

2. Nesting

3. Mixins and extends

4. If/Else/Loops/etc

5. Math and color operations

6. Color functions

7. Imports and minifications

MAIN FEATURES

Page 8: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

8

SASS EXAMPLE

Page 9: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

9

SCSS EXAMPLE

Page 10: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

10

LESS EXAMPLE

Page 11: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

11

STYLUS EXAMPLE

Page 12: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

12

CSS RESULT

Page 13: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

13

IF, ELSE, FOR, EACH - SCSS

Page 14: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

14

CSS RESULT

Page 15: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

15

ANOTHER SCSS EXAMPLE

Page 16: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

16

CSS RESULT

Page 17: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

17

SCSS MIXIN FOR MEDIA

Page 18: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

18

SCSS MIXIN FOR PSEUDO-ELEMENTS

Page 19: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

19

SCSS MIXIN FOR ABSOLUTE POSITION

Page 20: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

20

SCSS MIXIN FOR BUTTONS

Page 21: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

21

FRAMEWORKS AND LIBRARIES

Page 22: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

22

TOOLS

Grunt / Gulp1

Ruby / Compass2

Plugins and extensions for your IDE3

Online-tools — SassMeister, LESS2CSS, Try Sass, LESS Tester etc.

4

Software — Prepros, Kodekit, Less.app, Koala, Crunch etc.5

Page 23: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

23

2

1

3

WHY IS IT BENEFICIAL FOR CUSTOMER?

TEAM WORKSFASTER

• Using a lot of features team members collaborate more efficiently

• Using frameworks and libraries team works faster — result earlier

• Reusing is easier

• Less man-hours to complete work

FLEXIBILITY AND RESPONSIVENESS

• Less time to make some important changes

• Less time to extend existent code

• Great opportunities to collaborate with customer and designers

MAINTAINABLE AND REUSABLECODE

• Code is more maintainable and clean — new team member can start faster

• Code is more reusable — don’t need to spend time for the same

Page 24: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

24

• Customer / Designer changed color palette or font family.

• We need to reuse some part from other application.

• We need to add new device support.

• We need to add some browser support.

• We need to create prototype in Customer colors.

• …

PROBLEMS THAT COULD BE SOLVED WITH PREPROCESSORS

Page 25: 1 CSS-PREPROCESSORS as a way to speed up the process of interfaces developing and achieve Customer goals DMITRY SHURSHILIN AUGUST 3, 2015

25

THANKS!