SlideShare a Scribd company logo
LESS CSS
By
Man Math
Support Developer
097 847 0 847
man@web-essentials.asia
Agenda
• What is LESS ?
• LESS features
• LESS Advantages
• How to use LESS ?
• References
• Demo
225-May-2013
What is LESS ?
• Dynamic Style sheet language designed
by Alexis Sellier
• The CSS pre-processors
• Leaner/Meaner CSS
• Valid CSS is valid LESS
25-May-2013 3
LESS Features
• Less variable defined with at sign (@)
Less CSS
25-May-2013 5
Variable
Operations
• Less allows addition, subtraction, division
and multiplication of property values and
colors
Less CSS
25-May-2013 6
Function (build-in)
• Functions map one-to-one with JavaScript
code, allowing manipulation of values. It
could be Math functions, color function,
…
Less CSS
25-May-2013 7
Color
Functions
Mixins
• Mixins allow embedding all the properties
of a class into another class by including
the class name as one of its properties,
thus behaving as a sort of constant or
variable. They can also behave like
functions, and take arguments.
25-May-2013 9
Less CSS
25-May-2013 10
Nested
Less CSS
25-May-2013 11
Guard Expression (if
statement)
Less
25-May-2013 12
Guard Expression (if
statement)
CSS
25-May-2013 13
Variable scope
• The scope is
inside the curly
bracket ({ }),
otherwise you
have to declare
as global
25-May-2013 14
Error
LESS Advantages
• Increase readability and organization of
CSS using:
Imports
Nested rules
Comments
/* comment here */
// quick comment
25-May-2013 15
LESS Advantages
• Decrease how much CSS you have to
write using:
Variable
Function and Operations
Mixins
Expression statement
Namespace
25-May-2013 16
LESS is more
while
CSS is always sucks
How to use LESS ?
Client side
• Include your less file (*.less) in <head> tag
• Download less.js from http://lesscss.org
• Include less.js after your less file <head>
Make sure you include style sheets before the script
25-May-2013 19
Server side
• Installation (Unix/Linux OS)
$ npm install –g less
• Command line
Compile less as plain CSS
$ lessc style.less > style.css
This command will output the simple plain CSS
25-May-2013 20
Server side
• You might want minified CSS output
Simple minified CSS
$ lessc –x style.less > style.css
Most minified CSS
$ lessc –yui-compress style.less > style.css
For more command option you can run
$ lessc or
$ lessc --help
25-May-2013 21
Less compiler on Windows or
Mac
• Cygwin (http://cygwin.com)
• SimpLESS (http://wearekiss.com/simpless)
• Koala (http://koala-app.com)
• WinLESS (http://winless.org)
• …
25-May-2013 22
References
• http://lesscss.org
• http://css-tricks.com/sass-vs-less
• http://dotlesscss.org
• http://leafo.net/lessphp
• https://github.com/cloudhead/less
• http://en.wikipedia.org/wiki/LESS_(styles
heet_language)
25-May-2013 23
Demo
Thanks You!

More Related Content

What's hot

Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
Chris Lee
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
Jeanho Chu
 

What's hot (18)

Less
LessLess
Less
 
Beautifying senc
Beautifying sencBeautifying senc
Beautifying senc
 
A journey from sass to css in-js
A journey from sass to css in-jsA journey from sass to css in-js
A journey from sass to css in-js
 
Sass presentation
Sass presentationSass presentation
Sass presentation
 
Dallas Drupal Days 2012 - Introduction to less sass-compass
Dallas Drupal Days 2012  - Introduction to less sass-compassDallas Drupal Days 2012  - Introduction to less sass-compass
Dallas Drupal Days 2012 - Introduction to less sass-compass
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)
 
ApacheCon North America - Introduction to FlexJS
ApacheCon North America - Introduction to FlexJSApacheCon North America - Introduction to FlexJS
ApacheCon North America - Introduction to FlexJS
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
'Less' css
'Less' css'Less' css
'Less' css
 
Static Site Generation with Hugo and Markdown
Static Site Generation with Hugo and MarkdownStatic Site Generation with Hugo and Markdown
Static Site Generation with Hugo and Markdown
 
Html5
Html5Html5
Html5
 
Create SASSy web parts in SPFx
Create SASSy web parts in SPFxCreate SASSy web parts in SPFx
Create SASSy web parts in SPFx
 
Choosing your animation adventure - Generate NYC 2018
Choosing your animation adventure  - Generate NYC 2018Choosing your animation adventure  - Generate NYC 2018
Choosing your animation adventure - Generate NYC 2018
 
CSS Modules
CSS ModulesCSS Modules
CSS Modules
 
Introduction to sass
Introduction to sassIntroduction to sass
Introduction to sass
 
Learn css step by step online course
Learn css step by step online course Learn css step by step online course
Learn css step by step online course
 
Design todevelop
Design todevelopDesign todevelop
Design todevelop
 
BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12BDUG Responsive Web Theming - 7/23/12
BDUG Responsive Web Theming - 7/23/12
 

Viewers also liked

less freamwork
less freamworkless freamwork
less freamwork
kafshduzak
 

Viewers also liked (20)

LESS(CSS preprocessor)
LESS(CSS preprocessor)LESS(CSS preprocessor)
LESS(CSS preprocessor)
 
Less is more
Less is moreLess is more
Less is more
 
Less css
Less cssLess css
Less css
 
Less css
Less cssLess css
Less css
 
less freamwork
less freamworkless freamwork
less freamwork
 
2014 WordPress NYC Meetup: Better WordPress Style - Using SASS and LESS CSS I...
2014 WordPress NYC Meetup: Better WordPress Style - Using SASS and LESS CSS I...2014 WordPress NYC Meetup: Better WordPress Style - Using SASS and LESS CSS I...
2014 WordPress NYC Meetup: Better WordPress Style - Using SASS and LESS CSS I...
 
CSS with LESS for #jd13nl
CSS with LESS for #jd13nlCSS with LESS for #jd13nl
CSS with LESS for #jd13nl
 
Less css
Less cssLess css
Less css
 
LESS
LESSLESS
LESS
 
Introduction to LESS
Introduction to LESSIntroduction to LESS
Introduction to LESS
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
 
Google Calendar Presentation
Google Calendar PresentationGoogle Calendar Presentation
Google Calendar Presentation
 
Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013Using LESS, the CSS Preprocessor: J and Beyond 2013
Using LESS, the CSS Preprocessor: J and Beyond 2013
 
Doing More with LESS for CSS
Doing More with LESS for CSSDoing More with LESS for CSS
Doing More with LESS for CSS
 
LESS, the CSS Preprocessor
LESS, the CSS PreprocessorLESS, the CSS Preprocessor
LESS, the CSS Preprocessor
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
CSS előfeldolgozók
CSS előfeldolgozókCSS előfeldolgozók
CSS előfeldolgozók
 
Google calendar presentation
Google calendar presentationGoogle calendar presentation
Google calendar presentation
 
PostCSS، آینده CSS بعد از LESS و Sass
PostCSS، آینده CSS بعد از LESS و SassPostCSS، آینده CSS بعد از LESS و Sass
PostCSS، آینده CSS بعد از LESS و Sass
 
LESS vs. SASS - CSS Precompiler Showdown
LESS vs. SASS - CSS Precompiler ShowdownLESS vs. SASS - CSS Precompiler Showdown
LESS vs. SASS - CSS Precompiler Showdown
 

Similar to LESS CSS

Similar to LESS CSS (20)

LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introduction
 
Less(CSS Pre Processor) Introduction
Less(CSS Pre Processor) IntroductionLess(CSS Pre Processor) Introduction
Less(CSS Pre Processor) Introduction
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX[Bauer] SASSy web parts with SPFX
[Bauer] SASSy web parts with SPFX
 
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
SPS Oslo - Stop your SharePoint CSS becoming a di-sass-ter today!
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Less - an Introduction
Less - an IntroductionLess - an Introduction
Less - an Introduction
 
Why less?
Why less?Why less?
Why less?
 
Css Systems
Css SystemsCss Systems
Css Systems
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
 
Web technology
Web technologyWeb technology
Web technology
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
From CSS to Sass in WordPress
From CSS to Sass in WordPressFrom CSS to Sass in WordPress
From CSS to Sass in WordPress
 
Structuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSSStructuring your CSS for maintainability: rules and guile lines to write CSS
Structuring your CSS for maintainability: rules and guile lines to write CSS
 
Stop your share point css become a di-sass-ter today - SPS Munich
Stop your share point css become a di-sass-ter today - SPS MunichStop your share point css become a di-sass-ter today - SPS Munich
Stop your share point css become a di-sass-ter today - SPS Munich
 
Less, bootstrap and more
Less, bootstrap and moreLess, bootstrap and more
Less, bootstrap and more
 
LESS is More (ChiHTML5 Meetup June 2016)
LESS is More (ChiHTML5 Meetup June 2016)LESS is More (ChiHTML5 Meetup June 2016)
LESS is More (ChiHTML5 Meetup June 2016)
 
European SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint SassyEuropean SharePoint Webinar - Make SharePoint Sassy
European SharePoint Webinar - Make SharePoint Sassy
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
 
SQL Server 2016 BI updates
SQL Server 2016 BI updatesSQL Server 2016 BI updates
SQL Server 2016 BI updates
 

More from Man Math (6)

Introduction TYPO3 Version 6.1.5
Introduction TYPO3 Version 6.1.5Introduction TYPO3 Version 6.1.5
Introduction TYPO3 Version 6.1.5
 
Web Responsive Design
Web Responsive DesignWeb Responsive Design
Web Responsive Design
 
Responsive with Zurb Foundation
Responsive with Zurb FoundationResponsive with Zurb Foundation
Responsive with Zurb Foundation
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Benefit of doing Internship
Benefit of doing InternshipBenefit of doing Internship
Benefit of doing Internship
 
Angkor charity trip partnership proposal
Angkor charity trip partnership proposalAngkor charity trip partnership proposal
Angkor charity trip partnership proposal
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 

Recently uploaded (20)

slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 

LESS CSS