SlideShare a Scribd company logo
{less} 시작하기
ABC Talk / Alan Hong
오늘은
{less}에 대해 간단히 살펴보고
새 프로젝트를 시작할 때, 거부감없이 사용할 수 있도록…
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
less?
The dynamic stylesheet language. !
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.!
LESS runs on both the server-side (with Node.js and
Rhino) or client-side (modern browsers only).
Variables
•

specify values in a single place, and then re-use
them through the stylesheet.!

•

http://jsbin.com/AYOHIxE/5/edit
Scope
•

When defining a variable twice, the last definition of
the variable is used, searching from the current
scope upwards.!

•

http://jsbin.com/AwUhUviw/2/edit
Comments
•

Single-line comments are also valid in LESS, but
they are ‘silent’, they don’t show up in the compiled
CSS output!

•

http://jsbin.com/EBomeHoW/1/edit
Mixins
•

embed all the properties of a class into another
class.!

•

http://jsbin.com/uDUWEKo/3/edit
Parametric Mixins
•

LESS has a special type of ruleset which can be
mixed in like classes, but accepts parameters.!

•

http://jsbin.com/uDUWEKo/1/edit
!important
•

Use the !important keyword after mixin call to mark
all properties brought by it as !important!

•

http://jsbin.com/idALUbE/1/edit
Nested Rules
•

nest selectors inside other selectors. This makes
inheritance clear and style sheets shorter.!

•

http://jsbin.com/iKUsiNI/4/edit
Less
CSS Selector Nightmare
& combinator
•

it’s used when you want a nested selector to be
concatenated to its parent selector, instead of acting
as a descendant. This is especially important for
pseudo-classes like :hover and :focus.!

•

http://jsbin.com/iKUsiNI/3/edit
Nested Media Queries
•

Media queries can be nested in the same way as
selectors e.g.!

•

http://jsbin.com/eMAQOmOC/2/edit
Operations
•

Operations let you add, subtract, divide and multiply
property values and colors.!

•

http://jsbin.com/IVABOGO/2/edit
Functions
•

LESS provides a variety of functions which
transform colors, manipulate strings and do maths.!

•

Color: http://jsbin.com/eBipaMUB/1/edit!

•

Math: http://jsbin.com/enIsiZig/1/edit
Importing
•

You can import both CSS and LESS files. Only
LESS files import statements are processed, CSS
file import statements are kept as they are.
String interpolation
•

Variables can be embedded inside strings in a
similar way to Ruby or PHP, with the @{name}
construct
Example
•

less-elements: https://github.com/dmitryf/elements/
blob/master/elements.less!

•

less-elements example: https://github.com/
HackerWins/summernote/blob/master/
summernote.less!

•

CSS Sprites: http://jsbin.com/OluTehe/1/edit
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
Less
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
Less
결국…
sass: star (2741), fork (470)!
less: star (9582), fork (2034)
vs Sass
•

Both Sass and LESS are CSS preprocessors, which allow
writing clean CSS in a programming construct instead of
static rules.[5]!

•

LESS is inspired by Sass.[6] Sass was designed to both
simplify and extend CSS, so things like curly braces were
removed from the syntax. LESS was designed to be as
close to CSS as possible, so the syntax is identical to
existing CSS code. As a result, existing CSS can be used
as valid LESS code.!

•

The newer versions of Sass also introduced a CSS-like
syntax called SCSS (Sassy CSS).[2]
이미 늦은듯…
sass: star (2741), fork (470)!
less: star (9582), fork (2034)
감사합니다.

More Related Content

PPTX
Less css
PPTX
Start using less css
PPTX
.Less - CSS done right
PPT
PPT
An Introduction to CSS Preprocessors (SASS & LESS)
PDF
Using LESS, the CSS Preprocessor: J and Beyond 2013
PDF
ParisJS #11 : Sass & Compass
PPT
CSS Preprocessors: LESS is more or look SASS-y trying
Less css
Start using less css
.Less - CSS done right
An Introduction to CSS Preprocessors (SASS & LESS)
Using LESS, the CSS Preprocessor: J and Beyond 2013
ParisJS #11 : Sass & Compass
CSS Preprocessors: LESS is more or look SASS-y trying

What's hot (20)

ODP
Deep dive into sass
PDF
LESS, the CSS Preprocessor
PPTX
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
PPTX
Write LESS. DO more.
PPTX
Less presentation
PPTX
PDF
LESS CSS
PDF
Css to-scss
PPTX
WordPress as a CMS
PPTX
Introduction to sass
PPTX
Introduction to SASS
PPT
Html & Css presentation
PDF
CSS - OOCSS, SMACSS and more
PPTX
Syntactically awesome stylesheets (Sass)
PDF
Introduction to CSS3
PPTX
Css 3
PPTX
Css 3
PPTX
SASS is more than LESS
PDF
Week01 jan19 introductionto_php
Deep dive into sass
LESS, the CSS Preprocessor
HTML5, CSS, JavaScript Style guide and coding conventions
Write LESS. DO more.
Less presentation
LESS CSS
Css to-scss
WordPress as a CMS
Introduction to sass
Introduction to SASS
Html & Css presentation
CSS - OOCSS, SMACSS and more
Syntactically awesome stylesheets (Sass)
Introduction to CSS3
Css 3
Css 3
SASS is more than LESS
Week01 jan19 introductionto_php
Ad

Similar to Less (20)

PPTX
Revamp Your Stylesheet
PDF
Less(CSS Pre Processor) Introduction
PDF
LESS(CSS Pre Processor) introduction
PPTX
Less css framework
PPTX
Elegant CSS Design In Drupal: LESS vs Sass
PDF
CSS Less framework overview, Pros and Cons
PPTX
LESS vs. SASS
PPS
What is LessCSS and its Detailed Explation - Xhtmlchop
PDF
Less vs sass
PDF
LESS is More (ChiHTML5 Meetup June 2016)
PDF
LESS is More
PPT
LESS(CSS preprocessor)
PPT
Why less?
PDF
Get into less by tess hsu
PDF
A better CSS: Sass and Less - CC FE & UX
PPTX
PDF
Css preprocessor-140606115334-phpapp01
PDF
CSS preprocessor: why and how
PPTX
Doing More With Less
PPTX
Web technologies-course 05.pptx
Revamp Your Stylesheet
Less(CSS Pre Processor) Introduction
LESS(CSS Pre Processor) introduction
Less css framework
Elegant CSS Design In Drupal: LESS vs Sass
CSS Less framework overview, Pros and Cons
LESS vs. SASS
What is LessCSS and its Detailed Explation - Xhtmlchop
Less vs sass
LESS is More (ChiHTML5 Meetup June 2016)
LESS is More
LESS(CSS preprocessor)
Why less?
Get into less by tess hsu
A better CSS: Sass and Less - CC FE & UX
Css preprocessor-140606115334-phpapp01
CSS preprocessor: why and how
Doing More With Less
Web technologies-course 05.pptx
Ad

Recently uploaded (20)

PPTX
OMC Textile Division Presentation 2021.pptx
PDF
August Patch Tuesday
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Getting Started with Data Integration: FME Form 101
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
TLE Review Electricity (Electricity).pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
OMC Textile Division Presentation 2021.pptx
August Patch Tuesday
Programs and apps: productivity, graphics, security and other tools
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
Getting Started with Data Integration: FME Form 101
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Diabetes mellitus diagnosis method based random forest with bat algorithm
Building Integrated photovoltaic BIPV_UPV.pdf
Assigned Numbers - 2025 - Bluetooth® Document
TLE Review Electricity (Electricity).pptx
A comparative study of natural language inference in Swahili using monolingua...
SOPHOS-XG Firewall Administrator PPT.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx

Less

  • 2. 오늘은 {less}에 대해 간단히 살펴보고 새 프로젝트를 시작할 때, 거부감없이 사용할 수 있도록…
  • 3. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 4. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 5. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 6. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 7. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 8. less? The dynamic stylesheet language. ! LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.! LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only).
  • 9. Variables • specify values in a single place, and then re-use them through the stylesheet.! • http://jsbin.com/AYOHIxE/5/edit
  • 10. Scope • When defining a variable twice, the last definition of the variable is used, searching from the current scope upwards.! • http://jsbin.com/AwUhUviw/2/edit
  • 11. Comments • Single-line comments are also valid in LESS, but they are ‘silent’, they don’t show up in the compiled CSS output! • http://jsbin.com/EBomeHoW/1/edit
  • 12. Mixins • embed all the properties of a class into another class.! • http://jsbin.com/uDUWEKo/3/edit
  • 13. Parametric Mixins • LESS has a special type of ruleset which can be mixed in like classes, but accepts parameters.! • http://jsbin.com/uDUWEKo/1/edit
  • 14. !important • Use the !important keyword after mixin call to mark all properties brought by it as !important! • http://jsbin.com/idALUbE/1/edit
  • 15. Nested Rules • nest selectors inside other selectors. This makes inheritance clear and style sheets shorter.! • http://jsbin.com/iKUsiNI/4/edit
  • 18. & combinator • it’s used when you want a nested selector to be concatenated to its parent selector, instead of acting as a descendant. This is especially important for pseudo-classes like :hover and :focus.! • http://jsbin.com/iKUsiNI/3/edit
  • 19. Nested Media Queries • Media queries can be nested in the same way as selectors e.g.! • http://jsbin.com/eMAQOmOC/2/edit
  • 20. Operations • Operations let you add, subtract, divide and multiply property values and colors.! • http://jsbin.com/IVABOGO/2/edit
  • 21. Functions • LESS provides a variety of functions which transform colors, manipulate strings and do maths.! • Color: http://jsbin.com/eBipaMUB/1/edit! • Math: http://jsbin.com/enIsiZig/1/edit
  • 22. Importing • You can import both CSS and LESS files. Only LESS files import statements are processed, CSS file import statements are kept as they are.
  • 23. String interpolation • Variables can be embedded inside strings in a similar way to Ruby or PHP, with the @{name} construct
  • 24. Example • less-elements: https://github.com/dmitryf/elements/ blob/master/elements.less! • less-elements example: https://github.com/ HackerWins/summernote/blob/master/ summernote.less! • CSS Sprites: http://jsbin.com/OluTehe/1/edit
  • 25. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 26. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 27. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 29. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 30. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 32. 결국… sass: star (2741), fork (470)! less: star (9582), fork (2034)
  • 33. vs Sass • Both Sass and LESS are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]! • LESS is inspired by Sass.[6] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. LESS was designed to be as close to CSS as possible, so the syntax is identical to existing CSS code. As a result, existing CSS can be used as valid LESS code.! • The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).[2]
  • 34. 이미 늦은듯… sass: star (2741), fork (470)! less: star (9582), fork (2034)