SlideShare a Scribd company logo
1 of 13
Download to read offline
Joomla + LESS
Milwaukee JUG
May 23, 2013
Cory Webb
Agenda
● What is LESS
● LESS Resources
● LESS in Joomla
● Hands-on
● Questions
What is LESS
● “The dynamic stylesheet language”
● Everything I always wanted CSS to be
● Extends CSS with variables, mixins, nested
rules, operations and functions
● Must be compiled
Variables
● Set widely used values in one place
● Re-use them throughout the stylesheet
● Set once, change once
Mixins
● Embed all properties of a class into another
class
● Behave like functions and take arguments
● Great for setting values that have a lot of
browser prefixes
● Example: border-radius
Border Radius Example
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}
.some-class-here {
.border-radius(5px);
}
Nested Rules
● Nest selectors inside other selectors to specify
inheritence
<div class=”top-level”>
<div class=”next-level”>
<div class=”third-level”>
...
</div>
</div>
</div>
Nested Rules
● Old Way
.top-level .next-level .third-level {
/* Set styles here */
}
● With LESS
.top-level {
.next-level {
.third-level {
// Set styles here
}
}
}
Operations & Functions
● Operations let you add, subtract, divide and
multiply property values and colors.
● Functions can be used to transform colors,
manipulate strings and do math
● Example: color(@string); // parses a string to a color
● Function Reference: http://lesscss.org/#reference
LESS Resources
● Main Website: http://lesscss.org/
● LESS Compilers:
● CodeKit: http://incident57.com/codekit/
● Crunch App: http://crunchapp.net/
● LESS PHP: http://leafo.net/lessphp/
LESS in Joomla
● Bootstrap built into Joomla 3.0
● You still have to compile your LESS files to CSS
● Many template frameworks now include LESS-
CSS compilers
● Be wise in choosing your compiling strategy
● Server-side compiling can add to load times if you
do them on every page load
● Compile once and re-use
● Only compile when changes are made
Hands-on With LESS
Questions?
@corywebb

More Related Content

What's hot

MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 
Cloud App Develop
Cloud App DevelopCloud App Develop
Cloud App Develop
Fin Chen
 

What's hot (20)

Thinkin' Tags - Rapid Prototyping of CSS Layouts
Thinkin' Tags - Rapid Prototyping of CSS LayoutsThinkin' Tags - Rapid Prototyping of CSS Layouts
Thinkin' Tags - Rapid Prototyping of CSS Layouts
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
Why less?
Why less?Why less?
Why less?
 
MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF Python
 
Grails
GrailsGrails
Grails
 
Php course
Php coursePhp course
Php course
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
 
Writing Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMSWriting Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMS
 
Mongodb open data day 2014
Mongodb open data day 2014Mongodb open data day 2014
Mongodb open data day 2014
 
Full stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choiceFull stack JavaScript - the folly of choice
Full stack JavaScript - the folly of choice
 
Introduction to JavaScript Full Stack
Introduction to JavaScript Full StackIntroduction to JavaScript Full Stack
Introduction to JavaScript Full Stack
 
Static Websites - The Final Frontier
Static Websites - The Final FrontierStatic Websites - The Final Frontier
Static Websites - The Final Frontier
 
Web technology
Web technologyWeb technology
Web technology
 
Bootstrap vs. Skeleton
Bootstrap vs. SkeletonBootstrap vs. Skeleton
Bootstrap vs. Skeleton
 
Cloud App Develop
Cloud App DevelopCloud App Develop
Cloud App Develop
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
Part One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackPart One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN Stack
 
cpp-2013 #4 Memory management
cpp-2013 #4 Memory managementcpp-2013 #4 Memory management
cpp-2013 #4 Memory management
 
Ajax introduction
Ajax introductionAjax introduction
Ajax introduction
 
Mean Stack for Beginners
Mean Stack for BeginnersMean Stack for Beginners
Mean Stack for Beginners
 

Similar to Adding and modifying LESS in your web site templates

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
 
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
mirahman
 

Similar to Adding and modifying LESS in your web site templates (20)

Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
 
Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
WordCamp NYC - DRY CSS
WordCamp NYC - DRY CSSWordCamp NYC - DRY CSS
WordCamp NYC - DRY CSS
 
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
 
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
 
Css Systems
Css SystemsCss Systems
Css Systems
 
Inline style best practices in reactjs
Inline style best practices in reactjsInline style best practices in reactjs
Inline style best practices in reactjs
 
Bhavesh ro r
Bhavesh ro rBhavesh ro r
Bhavesh ro r
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
 
Evolution of CSS
Evolution of CSSEvolution of CSS
Evolution of CSS
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with Grails
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Less - an Introduction
Less - an IntroductionLess - an Introduction
Less - an Introduction
 
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and CompassBringing sexy back to CSS: SASS/SCSS, LESS and Compass
Bringing sexy back to CSS: SASS/SCSS, LESS and Compass
 
Object(ive) Thinking
Object(ive) ThinkingObject(ive) Thinking
Object(ive) Thinking
 
Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01Css preprocessor-140606115334-phpapp01
Css preprocessor-140606115334-phpapp01
 
CSS preprocessor: why and how
CSS preprocessor: why and howCSS preprocessor: why and how
CSS preprocessor: why and how
 
Introducing grunt, npm and sass
Introducing grunt, npm and sassIntroducing grunt, npm and sass
Introducing grunt, npm and sass
 

More from vdrover

Fixing Joomla's SEO problems with sh404SEF
Fixing Joomla's SEO problems with sh404SEFFixing Joomla's SEO problems with sh404SEF
Fixing Joomla's SEO problems with sh404SEF
vdrover
 
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
vdrover
 
Joomla! security 101
Joomla! security 101Joomla! security 101
Joomla! security 101
vdrover
 
Jug joomla 1.6
Jug joomla 1.6Jug joomla 1.6
Jug joomla 1.6
vdrover
 
Tour of sh404SEF - SEO and security for Joomla
Tour of sh404SEF - SEO and security for JoomlaTour of sh404SEF - SEO and security for Joomla
Tour of sh404SEF - SEO and security for Joomla
vdrover
 

More from vdrover (17)

Wordpress security best practices - WordCamp Waukesha 2017
Wordpress security best practices - WordCamp Waukesha 2017Wordpress security best practices - WordCamp Waukesha 2017
Wordpress security best practices - WordCamp Waukesha 2017
 
Joomla, open source and the power of volunteers
Joomla, open source and the power of volunteersJoomla, open source and the power of volunteers
Joomla, open source and the power of volunteers
 
Cracking the inbound marketing code joomla!dagen 2014
Cracking the inbound marketing code   joomla!dagen 2014Cracking the inbound marketing code   joomla!dagen 2014
Cracking the inbound marketing code joomla!dagen 2014
 
What's coming in Joomla 4 - Joomla Day Budapest 2013
What's coming in Joomla 4 - Joomla Day Budapest 2013What's coming in Joomla 4 - Joomla Day Budapest 2013
What's coming in Joomla 4 - Joomla Day Budapest 2013
 
Joomla SEO Overview featuring sh404SEF
Joomla SEO Overview featuring sh404SEFJoomla SEO Overview featuring sh404SEF
Joomla SEO Overview featuring sh404SEF
 
SEO Optimizing your Content Management System
SEO Optimizing your Content Management SystemSEO Optimizing your Content Management System
SEO Optimizing your Content Management System
 
Fixing Joomla's SEO problems with sh404SEF
Fixing Joomla's SEO problems with sh404SEFFixing Joomla's SEO problems with sh404SEF
Fixing Joomla's SEO problems with sh404SEF
 
Rethinking internationalization in Joomla 2.5 and beyond
Rethinking internationalization in Joomla 2.5 and beyondRethinking internationalization in Joomla 2.5 and beyond
Rethinking internationalization in Joomla 2.5 and beyond
 
There is no spoon 2
There is no spoon 2There is no spoon 2
There is no spoon 2
 
J upgrade presentation
J upgrade presentationJ upgrade presentation
J upgrade presentation
 
Chad Windnagle - Joomla Tips, Tricks & Must-have Extensions
Chad Windnagle - Joomla Tips, Tricks & Must-have ExtensionsChad Windnagle - Joomla Tips, Tricks & Must-have Extensions
Chad Windnagle - Joomla Tips, Tricks & Must-have Extensions
 
Yannick Gaultier - Using sh404SEF to improve search engine ranking of your Jo...
Yannick Gaultier - Using sh404SEF to improve search engine ranking of your Jo...Yannick Gaultier - Using sh404SEF to improve search engine ranking of your Jo...
Yannick Gaultier - Using sh404SEF to improve search engine ranking of your Jo...
 
Jeff Channell - Secure PHP Coding Practices
Jeff Channell - Secure PHP Coding PracticesJeff Channell - Secure PHP Coding Practices
Jeff Channell - Secure PHP Coding Practices
 
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
SEO, Analytics and Security with sh404SEF (JoomlaDay South Africa, 2011, Cape...
 
Joomla! security 101
Joomla! security 101Joomla! security 101
Joomla! security 101
 
Jug joomla 1.6
Jug joomla 1.6Jug joomla 1.6
Jug joomla 1.6
 
Tour of sh404SEF - SEO and security for Joomla
Tour of sh404SEF - SEO and security for JoomlaTour of sh404SEF - SEO and security for Joomla
Tour of sh404SEF - SEO and security for Joomla
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Adding and modifying LESS in your web site templates

  • 1. Joomla + LESS Milwaukee JUG May 23, 2013 Cory Webb
  • 2. Agenda ● What is LESS ● LESS Resources ● LESS in Joomla ● Hands-on ● Questions
  • 3. What is LESS ● “The dynamic stylesheet language” ● Everything I always wanted CSS to be ● Extends CSS with variables, mixins, nested rules, operations and functions ● Must be compiled
  • 4. Variables ● Set widely used values in one place ● Re-use them throughout the stylesheet ● Set once, change once
  • 5. Mixins ● Embed all properties of a class into another class ● Behave like functions and take arguments ● Great for setting values that have a lot of browser prefixes ● Example: border-radius
  • 6. Border Radius Example .border-radius(@radius) { -webkit-border-radius: @radius; -moz-border-radius: @radius; -ms-border-radius: @radius; -o-border-radius: @radius; border-radius: @radius; } .some-class-here { .border-radius(5px); }
  • 7. Nested Rules ● Nest selectors inside other selectors to specify inheritence <div class=”top-level”> <div class=”next-level”> <div class=”third-level”> ... </div> </div> </div>
  • 8. Nested Rules ● Old Way .top-level .next-level .third-level { /* Set styles here */ } ● With LESS .top-level { .next-level { .third-level { // Set styles here } } }
  • 9. Operations & Functions ● Operations let you add, subtract, divide and multiply property values and colors. ● Functions can be used to transform colors, manipulate strings and do math ● Example: color(@string); // parses a string to a color ● Function Reference: http://lesscss.org/#reference
  • 10. LESS Resources ● Main Website: http://lesscss.org/ ● LESS Compilers: ● CodeKit: http://incident57.com/codekit/ ● Crunch App: http://crunchapp.net/ ● LESS PHP: http://leafo.net/lessphp/
  • 11. LESS in Joomla ● Bootstrap built into Joomla 3.0 ● You still have to compile your LESS files to CSS ● Many template frameworks now include LESS- CSS compilers ● Be wise in choosing your compiling strategy ● Server-side compiling can add to load times if you do them on every page load ● Compile once and re-use ● Only compile when changes are made