SlideShare a Scribd company logo
1 of 20
LESS, JS & WP
for #WPN12
RUSSELL FAIR
developer / open source code junkie
r@q21.co
1 LESS joke
LESS != 'more';
LESS $beer != 'happy coder';
LESS $money != 'happy coder';
LESS $time_writing_css == 'happy coder';
doing LESS work is good
saves time
easier to navigate
#!watch
drawbacks? slow,
more variables = LESS code
@color1: #e4e9c2;
@padding1: 1%;
body { background: @color1; }
.hfeed {
     background:@color1;
     padding:@padding1;
}
custom LESS functions
.recolor( @color4:purple ) {
      body.blog {
           .hfeed {
                 background:@color4;
           }
      }
}
.recolor();
native LESS functions
body.blog {
     background: saturate(@color2, 90%);
}
.hfeed a {
     color: spin(@color2, 20);
}
more native LESS functions
.hentry:nth-child(3n+1) {
      background: lighten( @color2 , 20% );
}
.hentry:nth-child(3n+2) {
      background: darken( @color2 , 5% );
}
.hentry:nth-child(3n+3) {
      background: saturate( spin( @color3, -50
), 30% );
}
LESS math
.multiplication { margin: @padding1 * 2; }
.division { margin: @padding2 / 2; }
.addition(@width1, @width2) {
      width: @width1 + @width2;
}
.subtraction(@width1, @width2) {
      width: @width1 - @width2;
}
Less js-&-wp
Less js-&-wp
Less js-&-wp
Less js-&-wp
Less js-&-wp

More Related Content

Viewers also liked

Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
GGDBologna
 

Viewers also liked (20)

Make WordPress Fit: The Cinderella Shoe Approach to Custom Theming
Make WordPress Fit: The Cinderella Shoe Approach to Custom ThemingMake WordPress Fit: The Cinderella Shoe Approach to Custom Theming
Make WordPress Fit: The Cinderella Shoe Approach to Custom Theming
 
Wordpress para seus Clientes
Wordpress para seus ClientesWordpress para seus Clientes
Wordpress para seus Clientes
 
WordPress as a CMS
WordPress as a CMSWordPress as a CMS
WordPress as a CMS
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChiWordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
 
Getting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 MinutesGetting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 Minutes
 
Scoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an AgencyScoping and Estimating WordPress Projects as an Agency
Scoping and Estimating WordPress Projects as an Agency
 
Work, Life, Blog Balance
Work, Life, Blog BalanceWork, Life, Blog Balance
Work, Life, Blog Balance
 
Introduction to WordPress Multisite
Introduction to WordPress MultisiteIntroduction to WordPress Multisite
Introduction to WordPress Multisite
 
Congrats. You're having a WordPress Site. WordCamp Philly
Congrats. You're having a WordPress Site. WordCamp PhillyCongrats. You're having a WordPress Site. WordCamp Philly
Congrats. You're having a WordPress Site. WordCamp Philly
 
Como oferecer boas experiências online com a criação de sites de qualidade - ...
Como oferecer boas experiências online com a criação de sites de qualidade - ...Como oferecer boas experiências online com a criação de sites de qualidade - ...
Como oferecer boas experiências online com a criação de sites de qualidade - ...
 
WorryProof WordPress - Backup Strategies for Your Web Site
WorryProof WordPress - Backup Strategies for Your Web SiteWorryProof WordPress - Backup Strategies for Your Web Site
WorryProof WordPress - Backup Strategies for Your Web Site
 
Testing Made Easy
Testing Made EasyTesting Made Easy
Testing Made Easy
 
CSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the GutsCSI: WordPress -- Getting Into the Guts
CSI: WordPress -- Getting Into the Guts
 
Using Web Fonts in WordPress
Using Web Fonts in WordPress Using Web Fonts in WordPress
Using Web Fonts in WordPress
 
WordPress End-User Security - WordCamp Las Vegas 2011
WordPress End-User Security - WordCamp Las Vegas 2011WordPress End-User Security - WordCamp Las Vegas 2011
WordPress End-User Security - WordCamp Las Vegas 2011
 
Ten Things You Should Know About WordPress
Ten Things You Should Know About WordPressTen Things You Should Know About WordPress
Ten Things You Should Know About WordPress
 
Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?Acessibilidade Web agora é obrigatória. Estamos preparados?
Acessibilidade Web agora é obrigatória. Estamos preparados?
 
Rapid application development for WordPress using AWF
Rapid application development for WordPress using AWFRapid application development for WordPress using AWF
Rapid application development for WordPress using AWF
 

Similar to Less js-&-wp

LESS is More
LESS is MoreLESS is More
LESS is More
jsmith92
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
webhostingguy
 
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developersCoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developers
Mehdi Valikhani
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
Bryce Kerley
 
Using SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar ZikUsing SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar Zik
Miriam Schwab
 
Your Business. Your Language. Your Code - dpc13
Your Business. Your Language. Your Code - dpc13Your Business. Your Language. Your Code - dpc13
Your Business. Your Language. Your Code - dpc13
Stephan Hochdörfer
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
sqoo
 

Similar to Less js-&-wp (20)

Do more with {less}
Do more with {less}Do more with {less}
Do more with {less}
 
One Sass File, So Many Sites
One Sass File, So Many SitesOne Sass File, So Many Sites
One Sass File, So Many Sites
 
LESS is More
LESS is MoreLESS is More
LESS is More
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
 
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
Brian Hoke: WordCamp Toronto 2014 Presentation "Sass & WordPress"
 
Less & Sass
Less & SassLess & Sass
Less & Sass
 
Work and play with SASS & Compass
Work and play with SASS & CompassWork and play with SASS & Compass
Work and play with SASS & Compass
 
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developersCoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developers
 
Less
LessLess
Less
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principles
 
Less css
Less cssLess css
Less css
 
Phphacku iitd
Phphacku iitdPhphacku iitd
Phphacku iitd
 
Advanced Technology for Web Application Design
Advanced Technology for Web Application DesignAdvanced Technology for Web Application Design
Advanced Technology for Web Application Design
 
Using SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar ZikUsing SASS in the WordPress environment - Ran Bar Zik
Using SASS in the WordPress environment - Ran Bar Zik
 
Perl on Amazon Elastic MapReduce
Perl on Amazon Elastic MapReducePerl on Amazon Elastic MapReduce
Perl on Amazon Elastic MapReduce
 
Introduction to LESS
Introduction to LESSIntroduction to LESS
Introduction to LESS
 
Your Business. Your Language. Your Code - dpc13
Your Business. Your Language. Your Code - dpc13Your Business. Your Language. Your Code - dpc13
Your Business. Your Language. Your Code - dpc13
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 

More from rfair404 (6)

Gotta have vs must use plugins for WordPress multisite
Gotta have vs must use plugins for WordPress multisiteGotta have vs must use plugins for WordPress multisite
Gotta have vs must use plugins for WordPress multisite
 
Front End Publishing for WordPress
Front End Publishing for WordPressFront End Publishing for WordPress
Front End Publishing for WordPress
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Creating seo blogposts
Creating seo blogpostsCreating seo blogposts
Creating seo blogposts
 
Creating a Business Plan for a fake blog
Creating a Business Plan for a fake blogCreating a Business Plan for a fake blog
Creating a Business Plan for a fake blog
 
WordPress 3.0 and BuddyPress
WordPress 3.0 and BuddyPressWordPress 3.0 and BuddyPress
WordPress 3.0 and BuddyPress
 

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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
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
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 

Less js-&-wp

  • 1. LESS, JS & WP for #WPN12
  • 2. RUSSELL FAIR developer / open source code junkie r@q21.co
  • 3.
  • 4. 1 LESS joke LESS != 'more'; LESS $beer != 'happy coder'; LESS $money != 'happy coder'; LESS $time_writing_css == 'happy coder';
  • 5.
  • 6.
  • 7. doing LESS work is good saves time easier to navigate #!watch drawbacks? slow,
  • 8. more variables = LESS code @color1: #e4e9c2; @padding1: 1%; body { background: @color1; } .hfeed { background:@color1; padding:@padding1; }
  • 9.
  • 10.
  • 11.
  • 12. custom LESS functions .recolor( @color4:purple ) { body.blog { .hfeed { background:@color4; } } } .recolor();
  • 13. native LESS functions body.blog { background: saturate(@color2, 90%); } .hfeed a { color: spin(@color2, 20); }
  • 14. more native LESS functions .hentry:nth-child(3n+1) { background: lighten( @color2 , 20% ); } .hentry:nth-child(3n+2) { background: darken( @color2 , 5% ); } .hentry:nth-child(3n+3) { background: saturate( spin( @color3, -50 ), 30% ); }
  • 15. LESS math .multiplication { margin: @padding1 * 2; } .division { margin: @padding2 / 2; } .addition(@width1, @width2) { width: @width1 + @width2; } .subtraction(@width1, @width2) { width: @width1 - @width2; }