SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
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!

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

less freamwork
less freamworkless freamwork
less freamwork
kafshduzak
 

Destacado (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 a LESS CSS

Similar a 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
 

Más de 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
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Último (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

LESS CSS