SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
@hans2103
CSS met LESS
waar begin ik?
een presentatie voor de Joomla!dagen
21 april 2013 Woudschoten - Zeist
hans2103
Sunday 21 April 13
@hans2103
CSS met LESS
waar begin ik?
een presentatie voor de Joomla!dagen
21 april 2013 Woudschoten - Zeist
hans2103
presentatie kun je downloaden via
http://slideshare.net/hans2103
Sunday 21 April 13
@hans2103
Wat is LESS?
• LESS is een programmeertaal
• LESS compileer je naar CSS
• LESS is een CSS preprocessor
• LESS syntax is gemaakt vanuit CSS
• LESS is dynamisch CSS
Sunday 21 April 13
@hans2103
Waarom LESS gebruiken
• LESS bespaart tijd
• LESS vermindert fouten
• LESS vermindert herhalingen
• LESS is handig
Sunday 21 April 13
@hans2103
Hopsakee...
aan de slag!
veel code
Sunday 21 April 13
@hans2103
vooraf compileren
on the fly compileren
<link rel="stylesheet/css" href="style.css" />
<link rel="stylesheet/less" href="style.less" />
<script src="less.js"></script>
Sunday 21 April 13
@hans2103
style.less
// LESS
// import normalize for CSS resets
@import "normalize";
// same as @import “normalize.less”;
// import mixins
@import "mixins";
// base for mobile devices
@import "base";
//tables and small laptops
@media only screen and (min-width: 768px) {
@import "768up";
}
//desktop
@media only screen and (min-width: 1030px) {
@import "1030up";
}
Sunday 21 April 13
@hans2103@hans2103
#apt-get install node-less
http://winless.org
http://incident57.com/codekit
Sunday 21 April 13
@hans2103
clean structure with nesting
/* Compiled CSS */
#header {}
#header #nav {}
#header #nav ul {}
#header #nav ul li {}
#header #nav ul li a {}
// LESS
# header {
#nav {
ul {
li {
a {}
}
}
}
}
lijkt warempel op de HTML structuur
Sunday 21 April 13
@hans2103
clean structure with nesting
/* Compiled CSS */
a {}
a:hover {}
a:active {}
a:visited {}
// LESS
a {
&:hover {}
&:active {}
&:visited {}
}
Sunday 21 April 13
@hans2103
variables
standaard waarden om te hergebruiken in de stylesheet.
// LESS
@color: #4D926F;
@serif: serif;
@sans-serif: sans-serif;
#header {
color: @color;
font-family: @serif;
}
h2 {
color: @color;
font-family: @sans-serif;
}
/* Compiled CSS */
#header {
color: #4D926F;
font-family: serif;
}
h2 {
color: #4D926F;
font-family: sans-serif;
}
Sunday 21 April 13
@hans2103
mixins
Gebruik de waarden van een gehele class in een andere class.
// LESS
.bordered {
border-top: dotted 1px black;
border-bottom: solid 2px black;
}
#menu a {
color: #111;
.bordered;
}
.post a {
color: red;
.bordered;
}
/* Compiled CSS */
.bordered {
border-top: dotted 1px black;
border-bottom: solid 2px black;
}
#menu a {
color: #111;
border-top: dotted 1px black;
border-bottom: solid 2px black;
}
.post a {
color: red;
border-top: dotted 1px black;
border-bottom: solid 2px black;
}
@hans2103
Sunday 21 April 13
@hans2103
parametric mixins
parameters verwerkt in mixins
// LESS
.rounded-corners (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}
#header {
.rounded-corners;
}
#footer {
.rounded-corners(10px);
}
/* Compiled CSS */
#header {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
}
#footer {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
}
@hans2103
Sunday 21 April 13
@hans2103
operations (simple mathematical operators: + - * / )
// LESS
.font-size(@font-size: 16){
@remValue: (@font-size / 10);
font-size: @font-size * 1px;
font-size: ~"@{remValue}rem";
}
html {
font-size: 62.5%;
}
body {
.font-size();
}
h1 {
.font-size(24);
}
/* Compiled CSS */
html {
font-size: 62.5%;
}
body {
font-size: 16px;
font-size: 1.6rem;
}
h1 {
font-size: 24px;
font-size: 2.4rem;
}
http://snook.ca/archives/html_and_css/font-size-with-rem
Sunday 21 April 13
@hans2103
operations (simple mathematical operators: + - * / )
// LESS
@the-border: 2px;
@base-color: #111;
#header {
color: (@base-color * 3);
border-top: (@the-border / 2);
border-right: (@the-border + 2);
border-bottom: (@the-border - 1);
border-left: @the-border;
}
#footer {
color: (@base-color + #003300);
}
/* Compiled CSS */
#header {
color: #333;
border-top: 1px;
border-right: 4px;
border-bottom: 1px;
border-left: 2px;
}
#footer {
color: #114411;
}
Sunday 21 April 13
@hans2103
// LESS
escape(@string); // URL encodes a string
e(@string); // escape string content
%(@string, values...); // formats a string
unit(@dimension, [@unit: ""]); // remove or change the unit of a dimension
color(@string); // parses a string to a color
data-uri([mimetype,] url); // * inlines a resource and falls back to url()
ceil(@number); // rounds up to an integer
floor(@number); // rounds down to an integer
percentage(@number); // converts to a %, e.g. 0.5 -> 50%
round(number, [places: 0]); // rounds a number to a number of places
sqrt(number); // * calculates square root of a number
abs(number); // * absolute value of a number
sin(number); // * sine function
asin(number); // * arcsine - inverse of sine function
cos(number); // * cosine function
acos(number); // * arccosine - inverse of cosine function
tan(number); // * tangent function
atan(number); // * arctangent - inverse of tangent function
functions (map one-to-one with Javascript code)
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
functions - darken & lighten
// LESS
.background_gradient(@base) {
background: @base;
background: -webkit-gradient(linear, left top, left bottom, from(lighten(@base, 5%)), to(darken
background: -moz-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%));
}
@orange_base: #f78d1d;
.orange { .background_gradient(@orange_base);
&:hover { .background_gradient(darken(@orange_base, 10%)); }
&:active { .background_gradient(lighten(@orange_base, 10%)); }
}
@blue_base: #7db8db;
.blue { .background_gradient(@blue_base);
&:hover { .background_gradient(darken(@blue_base, 10%)); }
&:active { .background_gradient(lighten(@blue_base, 10%)); }
}
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
functions - darken & lighten
/* Compiled CSS */
.orange {
background: #f78d1d;
background: -webkit-gradient(linear,left top,left bottom,from(#f89936),to(#f28009));
background: -moz-linear-gradient(top,#f89936,#f28009);
}
.orange:hover {
background: #d97308;
background: -webkit-gradient(linear,left top,left bottom,from(#f28009),to(#c16607));
background: -moz-linear-gradient(top,#f28009,#c16607);
}
.orange:active {
background: #f9a64e;
background: -webkit-gradient(linear,left top,left bottom,from(#fab267),to(#f89936));
background: -moz-linear-gradient(top,#fab267,#f89936);
}
.blue {
background: #7db8db;
background: -webkit-gradient(linear,left top,left bottom,from(#91c3e1),to(#69add5));
background: -moz-linear-gradient(top,#91c3e1,#69add5);
}
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
functions - escaping
// LESS
.background_gradient(@base) {
background-color: @base;
background-image: -webkit-gradient(linear, left top, left bottom, from(lighten(@base, 5%)), to(
background-image: -webkit-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%));
background-image: -moz-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%));
background-image: -o-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%));
background-image: linear-gradient(to bottom, lighten(@base, 5%), darken(@base, 5%));
filter: e(progid:DXImageTransform.Microsoft.gradient(startColorstr=lighten(@base, 5%), end
}
@orange_base: #f78d1d;
.orange { .background_gradient(@orange_base);
&:hover { .background_gradient(darken(@orange_base, 10%)); }
&:active { .background_gradient(lighten(@orange_base, 10%)); }
}
@blue_base: #7db8db;
.blue { .background_gradient(@blue_base);
&:hover { .background_gradient(darken(@blue_base, 10%)); }
&:active { .background_gradient(lighten(@blue_base, 10%)); }
}
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
functions - escaping
/* Compiled CSS */
.orange {
background-color: #f78d1d;
background-image: -webkit-gradient(linear,left top,left bottom,from(#f89936),to(#f28009));
background-image: -webkit-linear-gradient(top,#f89936,#f28009);
background-image: -moz-linear-gradient(top,#f89936,#f28009);
background-image: -o-linear-gradient(top,#f89936,#f28009);
background-image: linear-gradient(to bottom,#f89936,#f28009);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#f89936,endColorstr=#f28
}
.orange:hover {
background-color: #f78d1d;
background-image: -webkit-gradient(linear,left top,left bottom,from(#f28009),to(#c16607));
background-image: -webkit-linear-gradient(top,#f28009,#c16607);
background-image: -moz-linear-gradient(top,#f28009,#c16607);
background-image: -o-linear-gradient(top,#f28009,#c16607);
background-image: linear-gradient(to bottom,#f28009,#c16607);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#f28009,endColorstr=#c16
}
.orange:active {
background-color: #f9a64e;
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
functions - data-uri
// LESS
data-uri('image/jpeg;base64', '../data/image.jpg');
/* Compiled CSS */
url('data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg==');
@hans2103
http://lesscss.org/#reference
flinke reductie HTTP-request.
voor- en nadelen beschreven in wiki
http://en.wikipedia.org/wiki/
Data_URI_scheme#Advantages
Sunday 21 April 13
@hans2103
String interpolation
// LESS
@baseUrl: "http://joomladagen.nl/";
@imageUrl: "images/";
background-image: url('@{baseUrl}@{imageUrl}logo.png');
/* CSS Compilation */
background-image: url('http://joomladagen.nl/images/logo.png');
@hans2103
http://lesscss.org/#reference
Sunday 21 April 13
@hans2103
scope
// LESS
header {
	

 @color: black;
	

 background-color: @color;
	

 nav {
	

 	

 @color: blue;
	

 	

 background-color: @color;
	

 	

 a {
	

 	

 color: @color;
	

 	

 }
	

 }
	

 h1 {
	

 	

 color: @color;
	

 }
}
@hans2103
/* Compiled CSS */
header {
background-color: black;
}
header nav {
background-color: blue;
}
header nav a {
color: blue;
}
header h1 {
color: black;
}
Sunday 21 April 13
@hans2103
combinator
Gebruik de waarden van een gehele class in een andere class.
// LESS
.bordered, .rounded {
&.float {
float: left;
}
.top {
margin: 5px;
}
& + & {
color: yellow;
}
}
/* Compiled CSS */
.bordered.float,
.rounded.float {
float: left;
}
.bordered .top,
.rounded .top {
margin: 5px;
}
.bordered + .bordered,
.rounded + .rounded {
color: yellow;
}
@hans2103
Sunday 21 April 13
@hans2103@hans2103
http://leafo.net/lessphp/lessify/
Sunday 21 April 13
@hans2103@hans2103
http://leafo.net/lessphp/editor.html
Sunday 21 April 13
@hans2103@hans2103
Sunday 21 April 13
@hans2103@hans2103
Sunday 21 April 13
@hans2103@hans2103
Sunday 21 April 13
@hans2103@hans2103
Sunday 21 April 13
@hans2103@hans2103
Sunday 21 April 13
@hans2103
Hopsakee...
aan de slag!
gewoon beginnen
Sunday 21 April 13
@hans2103
veel plezier
Sunday 21 April 13
@hans2103
http://www.flickr.com/photos/trasimac/1217071176
thank you for your time and have fun
http://slideshare.net/hans2103
hans2103
http://about.me/hans2103
Sunday 21 April 13

Contenu connexe

Tendances

CSS Frameworks
CSS FrameworksCSS Frameworks
CSS FrameworksMike Crabb
 
جيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليجيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليReda Hassan
 
Theme Kickstart
Theme KickstartTheme Kickstart
Theme KickstartPeter
 
FoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis SandersFoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis SandersAlexis Sanders
 
Accelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemAccelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemWynn Netherland
 
Haml And Sass
Haml And SassHaml And Sass
Haml And Sasswear
 
Sass maps, my precious! 2.0
Sass maps, my precious! 2.0Sass maps, my precious! 2.0
Sass maps, my precious! 2.0Andréa Zambrana
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSSMike Crabb
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3 Wynn Netherland
 

Tendances (13)

CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
 
جيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشماليجيفيرا باي الساحل الشمالي
جيفيرا باي الساحل الشمالي
 
Theme Kickstart
Theme KickstartTheme Kickstart
Theme Kickstart
 
FoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis SandersFoundConf 2018 Signals Speak - Alexis Sanders
FoundConf 2018 Signals Speak - Alexis Sanders
 
Theme02
Theme02Theme02
Theme02
 
Accelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gemAccelerated Native Mobile Development with the Ti gem
Accelerated Native Mobile Development with the Ti gem
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Haml And Sass
Haml And SassHaml And Sass
Haml And Sass
 
Sass maps, my precious! 2.0
Sass maps, my precious! 2.0Sass maps, my precious! 2.0
Sass maps, my precious! 2.0
 
Theme01
Theme01Theme01
Theme01
 
Theme03
Theme03Theme03
Theme03
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSS
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 

Similaire à CSS with LESS for #jd13nl

SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESSItai Koren
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESSjsmith92
 
LESS is More
LESS is MoreLESS is More
LESS is Morejsmith92
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentationMario Noble
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingJames Cryer
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with SassRob Friesel
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageKatsunori Tanaka
 
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 CompassClaudina Sarahe
 
Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesDinu Suman
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Learn Sass and Compass quick
Learn Sass and Compass quickLearn Sass and Compass quick
Learn Sass and Compass quickBilly Shih
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsKaelig Deloumeau-Prigent
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With LessDavid Engel
 

Similaire à CSS with LESS for #jd13nl (20)

Css frameworks
Css frameworksCss frameworks
Css frameworks
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 
Less css
Less cssLess css
Less css
 
SASS is more than LESS
SASS is more than LESSSASS is more than LESS
SASS is more than LESS
 
Doing more with LESS
Doing more with LESSDoing more with LESS
Doing more with LESS
 
LESS is More
LESS is MoreLESS is More
LESS is More
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Theming and Sass
Theming and SassTheming and Sass
Theming and Sass
 
CSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y tryingCSS Preprocessors: LESS is more or look SASS-y trying
CSS Preprocessors: LESS is more or look SASS-y trying
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 
LESS : The dynamic stylesheet language
LESS : The dynamic stylesheet languageLESS : The dynamic stylesheet language
LESS : The dynamic stylesheet language
 
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
 
LESS
LESSLESS
LESS
 
Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS files
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Learn Sass and Compass quick
Learn Sass and Compass quickLearn Sass and Compass quick
Learn Sass and Compass quick
 
Why less?
Why less?Why less?
Why less?
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
 
FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 

Plus de Hans Kuijpers

JD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayoutsJD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayoutsHans Kuijpers
 
RSForm!pro jug073 maart 2019
RSForm!pro  jug073 maart 2019RSForm!pro  jug073 maart 2019
RSForm!pro jug073 maart 2019Hans Kuijpers
 
Template overrides in joomla jug073 februari 2019
Template overrides in joomla   jug073 februari 2019Template overrides in joomla   jug073 februari 2019
Template overrides in joomla jug073 februari 2019Hans Kuijpers
 
Joomla Website optimaliseren - jug073 augustus 2018
Joomla Website optimaliseren - jug073 augustus 2018Joomla Website optimaliseren - jug073 augustus 2018
Joomla Website optimaliseren - jug073 augustus 2018Hans Kuijpers
 
Joomla Custom Fields - the next level
Joomla Custom Fields - the next level Joomla Custom Fields - the next level
Joomla Custom Fields - the next level Hans Kuijpers
 
Best Practice: Joomla! templating
Best Practice: Joomla! templatingBest Practice: Joomla! templating
Best Practice: Joomla! templatingHans Kuijpers
 
JD17NL Joomla! Overrides and alternate layouts
JD17NL Joomla! Overrides and alternate layoutsJD17NL Joomla! Overrides and alternate layouts
JD17NL Joomla! Overrides and alternate layoutsHans Kuijpers
 
Maak je website geschikt voor mobiel
Maak je website geschikt voor mobielMaak je website geschikt voor mobiel
Maak je website geschikt voor mobielHans Kuijpers
 
Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Hans Kuijpers
 
Google Webmasters Tools
Google Webmasters ToolsGoogle Webmasters Tools
Google Webmasters ToolsHans Kuijpers
 
Google Tag Manager #jd14nl
Google Tag Manager #jd14nlGoogle Tag Manager #jd14nl
Google Tag Manager #jd14nlHans Kuijpers
 
Social Share Buttons - #jd14nl
Social Share Buttons - #jd14nlSocial Share Buttons - #jd14nl
Social Share Buttons - #jd14nlHans Kuijpers
 
Site Performance Optimization for Joomla #jwc13
Site Performance Optimization for Joomla #jwc13Site Performance Optimization for Joomla #jwc13
Site Performance Optimization for Joomla #jwc13Hans Kuijpers
 
Rich Snippets in Joomla - #JUG073
Rich Snippets in Joomla - #JUG073Rich Snippets in Joomla - #JUG073
Rich Snippets in Joomla - #JUG073Hans Kuijpers
 
Rich Snippets in Magento product page - #MUG020
Rich Snippets in Magento product page - #MUG020Rich Snippets in Magento product page - #MUG020
Rich Snippets in Magento product page - #MUG020Hans Kuijpers
 
Rich Snippets in Magento product page
Rich Snippets in Magento product pageRich Snippets in Magento product page
Rich Snippets in Magento product pageHans Kuijpers
 
Site Speed Optimisation for JWC2012
Site Speed Optimisation for JWC2012Site Speed Optimisation for JWC2012
Site Speed Optimisation for JWC2012Hans Kuijpers
 
Form2content case for #JUG073
Form2content case for #JUG073Form2content case for #JUG073
Form2content case for #JUG073Hans Kuijpers
 
Magento Theme - set the basics right - mm12nl
Magento Theme - set the basics right - mm12nlMagento Theme - set the basics right - mm12nl
Magento Theme - set the basics right - mm12nlHans Kuijpers
 
Google analytics - jd12nl met Byte Internet
Google analytics - jd12nl met Byte InternetGoogle analytics - jd12nl met Byte Internet
Google analytics - jd12nl met Byte InternetHans Kuijpers
 

Plus de Hans Kuijpers (20)

JD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayoutsJD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
 
RSForm!pro jug073 maart 2019
RSForm!pro  jug073 maart 2019RSForm!pro  jug073 maart 2019
RSForm!pro jug073 maart 2019
 
Template overrides in joomla jug073 februari 2019
Template overrides in joomla   jug073 februari 2019Template overrides in joomla   jug073 februari 2019
Template overrides in joomla jug073 februari 2019
 
Joomla Website optimaliseren - jug073 augustus 2018
Joomla Website optimaliseren - jug073 augustus 2018Joomla Website optimaliseren - jug073 augustus 2018
Joomla Website optimaliseren - jug073 augustus 2018
 
Joomla Custom Fields - the next level
Joomla Custom Fields - the next level Joomla Custom Fields - the next level
Joomla Custom Fields - the next level
 
Best Practice: Joomla! templating
Best Practice: Joomla! templatingBest Practice: Joomla! templating
Best Practice: Joomla! templating
 
JD17NL Joomla! Overrides and alternate layouts
JD17NL Joomla! Overrides and alternate layoutsJD17NL Joomla! Overrides and alternate layouts
JD17NL Joomla! Overrides and alternate layouts
 
Maak je website geschikt voor mobiel
Maak je website geschikt voor mobielMaak je website geschikt voor mobiel
Maak je website geschikt voor mobiel
 
Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!
 
Google Webmasters Tools
Google Webmasters ToolsGoogle Webmasters Tools
Google Webmasters Tools
 
Google Tag Manager #jd14nl
Google Tag Manager #jd14nlGoogle Tag Manager #jd14nl
Google Tag Manager #jd14nl
 
Social Share Buttons - #jd14nl
Social Share Buttons - #jd14nlSocial Share Buttons - #jd14nl
Social Share Buttons - #jd14nl
 
Site Performance Optimization for Joomla #jwc13
Site Performance Optimization for Joomla #jwc13Site Performance Optimization for Joomla #jwc13
Site Performance Optimization for Joomla #jwc13
 
Rich Snippets in Joomla - #JUG073
Rich Snippets in Joomla - #JUG073Rich Snippets in Joomla - #JUG073
Rich Snippets in Joomla - #JUG073
 
Rich Snippets in Magento product page - #MUG020
Rich Snippets in Magento product page - #MUG020Rich Snippets in Magento product page - #MUG020
Rich Snippets in Magento product page - #MUG020
 
Rich Snippets in Magento product page
Rich Snippets in Magento product pageRich Snippets in Magento product page
Rich Snippets in Magento product page
 
Site Speed Optimisation for JWC2012
Site Speed Optimisation for JWC2012Site Speed Optimisation for JWC2012
Site Speed Optimisation for JWC2012
 
Form2content case for #JUG073
Form2content case for #JUG073Form2content case for #JUG073
Form2content case for #JUG073
 
Magento Theme - set the basics right - mm12nl
Magento Theme - set the basics right - mm12nlMagento Theme - set the basics right - mm12nl
Magento Theme - set the basics right - mm12nl
 
Google analytics - jd12nl met Byte Internet
Google analytics - jd12nl met Byte InternetGoogle analytics - jd12nl met Byte Internet
Google analytics - jd12nl met Byte Internet
 

Dernier

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

CSS with LESS for #jd13nl

  • 1. @hans2103 CSS met LESS waar begin ik? een presentatie voor de Joomla!dagen 21 april 2013 Woudschoten - Zeist hans2103 Sunday 21 April 13
  • 2. @hans2103 CSS met LESS waar begin ik? een presentatie voor de Joomla!dagen 21 april 2013 Woudschoten - Zeist hans2103 presentatie kun je downloaden via http://slideshare.net/hans2103 Sunday 21 April 13
  • 3. @hans2103 Wat is LESS? • LESS is een programmeertaal • LESS compileer je naar CSS • LESS is een CSS preprocessor • LESS syntax is gemaakt vanuit CSS • LESS is dynamisch CSS Sunday 21 April 13
  • 4. @hans2103 Waarom LESS gebruiken • LESS bespaart tijd • LESS vermindert fouten • LESS vermindert herhalingen • LESS is handig Sunday 21 April 13
  • 5. @hans2103 Hopsakee... aan de slag! veel code Sunday 21 April 13
  • 6. @hans2103 vooraf compileren on the fly compileren <link rel="stylesheet/css" href="style.css" /> <link rel="stylesheet/less" href="style.less" /> <script src="less.js"></script> Sunday 21 April 13
  • 7. @hans2103 style.less // LESS // import normalize for CSS resets @import "normalize"; // same as @import “normalize.less”; // import mixins @import "mixins"; // base for mobile devices @import "base"; //tables and small laptops @media only screen and (min-width: 768px) { @import "768up"; } //desktop @media only screen and (min-width: 1030px) { @import "1030up"; } Sunday 21 April 13
  • 9. @hans2103 clean structure with nesting /* Compiled CSS */ #header {} #header #nav {} #header #nav ul {} #header #nav ul li {} #header #nav ul li a {} // LESS # header { #nav { ul { li { a {} } } } } lijkt warempel op de HTML structuur Sunday 21 April 13
  • 10. @hans2103 clean structure with nesting /* Compiled CSS */ a {} a:hover {} a:active {} a:visited {} // LESS a { &:hover {} &:active {} &:visited {} } Sunday 21 April 13
  • 11. @hans2103 variables standaard waarden om te hergebruiken in de stylesheet. // LESS @color: #4D926F; @serif: serif; @sans-serif: sans-serif; #header { color: @color; font-family: @serif; } h2 { color: @color; font-family: @sans-serif; } /* Compiled CSS */ #header { color: #4D926F; font-family: serif; } h2 { color: #4D926F; font-family: sans-serif; } Sunday 21 April 13
  • 12. @hans2103 mixins Gebruik de waarden van een gehele class in een andere class. // LESS .bordered { border-top: dotted 1px black; border-bottom: solid 2px black; } #menu a { color: #111; .bordered; } .post a { color: red; .bordered; } /* Compiled CSS */ .bordered { border-top: dotted 1px black; border-bottom: solid 2px black; } #menu a { color: #111; border-top: dotted 1px black; border-bottom: solid 2px black; } .post a { color: red; border-top: dotted 1px black; border-bottom: solid 2px black; } @hans2103 Sunday 21 April 13
  • 13. @hans2103 parametric mixins parameters verwerkt in mixins // LESS .rounded-corners (@radius: 5px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; -ms-border-radius: @radius; -o-border-radius: @radius; border-radius: @radius; } #header { .rounded-corners; } #footer { .rounded-corners(10px); } /* Compiled CSS */ #header { -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; } #footer { -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; } @hans2103 Sunday 21 April 13
  • 14. @hans2103 operations (simple mathematical operators: + - * / ) // LESS .font-size(@font-size: 16){ @remValue: (@font-size / 10); font-size: @font-size * 1px; font-size: ~"@{remValue}rem"; } html { font-size: 62.5%; } body { .font-size(); } h1 { .font-size(24); } /* Compiled CSS */ html { font-size: 62.5%; } body { font-size: 16px; font-size: 1.6rem; } h1 { font-size: 24px; font-size: 2.4rem; } http://snook.ca/archives/html_and_css/font-size-with-rem Sunday 21 April 13
  • 15. @hans2103 operations (simple mathematical operators: + - * / ) // LESS @the-border: 2px; @base-color: #111; #header { color: (@base-color * 3); border-top: (@the-border / 2); border-right: (@the-border + 2); border-bottom: (@the-border - 1); border-left: @the-border; } #footer { color: (@base-color + #003300); } /* Compiled CSS */ #header { color: #333; border-top: 1px; border-right: 4px; border-bottom: 1px; border-left: 2px; } #footer { color: #114411; } Sunday 21 April 13
  • 16. @hans2103 // LESS escape(@string); // URL encodes a string e(@string); // escape string content %(@string, values...); // formats a string unit(@dimension, [@unit: ""]); // remove or change the unit of a dimension color(@string); // parses a string to a color data-uri([mimetype,] url); // * inlines a resource and falls back to url() ceil(@number); // rounds up to an integer floor(@number); // rounds down to an integer percentage(@number); // converts to a %, e.g. 0.5 -> 50% round(number, [places: 0]); // rounds a number to a number of places sqrt(number); // * calculates square root of a number abs(number); // * absolute value of a number sin(number); // * sine function asin(number); // * arcsine - inverse of sine function cos(number); // * cosine function acos(number); // * arccosine - inverse of cosine function tan(number); // * tangent function atan(number); // * arctangent - inverse of tangent function functions (map one-to-one with Javascript code) @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 17. @hans2103 functions - darken & lighten // LESS .background_gradient(@base) { background: @base; background: -webkit-gradient(linear, left top, left bottom, from(lighten(@base, 5%)), to(darken background: -moz-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%)); } @orange_base: #f78d1d; .orange { .background_gradient(@orange_base); &:hover { .background_gradient(darken(@orange_base, 10%)); } &:active { .background_gradient(lighten(@orange_base, 10%)); } } @blue_base: #7db8db; .blue { .background_gradient(@blue_base); &:hover { .background_gradient(darken(@blue_base, 10%)); } &:active { .background_gradient(lighten(@blue_base, 10%)); } } @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 18. @hans2103 functions - darken & lighten /* Compiled CSS */ .orange { background: #f78d1d; background: -webkit-gradient(linear,left top,left bottom,from(#f89936),to(#f28009)); background: -moz-linear-gradient(top,#f89936,#f28009); } .orange:hover { background: #d97308; background: -webkit-gradient(linear,left top,left bottom,from(#f28009),to(#c16607)); background: -moz-linear-gradient(top,#f28009,#c16607); } .orange:active { background: #f9a64e; background: -webkit-gradient(linear,left top,left bottom,from(#fab267),to(#f89936)); background: -moz-linear-gradient(top,#fab267,#f89936); } .blue { background: #7db8db; background: -webkit-gradient(linear,left top,left bottom,from(#91c3e1),to(#69add5)); background: -moz-linear-gradient(top,#91c3e1,#69add5); } @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 19. @hans2103 functions - escaping // LESS .background_gradient(@base) { background-color: @base; background-image: -webkit-gradient(linear, left top, left bottom, from(lighten(@base, 5%)), to( background-image: -webkit-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%)); background-image: -moz-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%)); background-image: -o-linear-gradient(top, lighten(@base, 5%), darken(@base, 5%)); background-image: linear-gradient(to bottom, lighten(@base, 5%), darken(@base, 5%)); filter: e(progid:DXImageTransform.Microsoft.gradient(startColorstr=lighten(@base, 5%), end } @orange_base: #f78d1d; .orange { .background_gradient(@orange_base); &:hover { .background_gradient(darken(@orange_base, 10%)); } &:active { .background_gradient(lighten(@orange_base, 10%)); } } @blue_base: #7db8db; .blue { .background_gradient(@blue_base); &:hover { .background_gradient(darken(@blue_base, 10%)); } &:active { .background_gradient(lighten(@blue_base, 10%)); } } @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 20. @hans2103 functions - escaping /* Compiled CSS */ .orange { background-color: #f78d1d; background-image: -webkit-gradient(linear,left top,left bottom,from(#f89936),to(#f28009)); background-image: -webkit-linear-gradient(top,#f89936,#f28009); background-image: -moz-linear-gradient(top,#f89936,#f28009); background-image: -o-linear-gradient(top,#f89936,#f28009); background-image: linear-gradient(to bottom,#f89936,#f28009); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#f89936,endColorstr=#f28 } .orange:hover { background-color: #f78d1d; background-image: -webkit-gradient(linear,left top,left bottom,from(#f28009),to(#c16607)); background-image: -webkit-linear-gradient(top,#f28009,#c16607); background-image: -moz-linear-gradient(top,#f28009,#c16607); background-image: -o-linear-gradient(top,#f28009,#c16607); background-image: linear-gradient(to bottom,#f28009,#c16607); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#f28009,endColorstr=#c16 } .orange:active { background-color: #f9a64e; @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 21. @hans2103 functions - data-uri // LESS data-uri('image/jpeg;base64', '../data/image.jpg'); /* Compiled CSS */ url('data:image/jpeg;base64,bm90IGFjdHVhbGx5IGEganBlZyBmaWxlCg=='); @hans2103 http://lesscss.org/#reference flinke reductie HTTP-request. voor- en nadelen beschreven in wiki http://en.wikipedia.org/wiki/ Data_URI_scheme#Advantages Sunday 21 April 13
  • 22. @hans2103 String interpolation // LESS @baseUrl: "http://joomladagen.nl/"; @imageUrl: "images/"; background-image: url('@{baseUrl}@{imageUrl}logo.png'); /* CSS Compilation */ background-image: url('http://joomladagen.nl/images/logo.png'); @hans2103 http://lesscss.org/#reference Sunday 21 April 13
  • 23. @hans2103 scope // LESS header { @color: black; background-color: @color; nav { @color: blue; background-color: @color; a { color: @color; } } h1 { color: @color; } } @hans2103 /* Compiled CSS */ header { background-color: black; } header nav { background-color: blue; } header nav a { color: blue; } header h1 { color: black; } Sunday 21 April 13
  • 24. @hans2103 combinator Gebruik de waarden van een gehele class in een andere class. // LESS .bordered, .rounded { &.float { float: left; } .top { margin: 5px; } & + & { color: yellow; } } /* Compiled CSS */ .bordered.float, .rounded.float { float: left; } .bordered .top, .rounded .top { margin: 5px; } .bordered + .bordered, .rounded + .rounded { color: yellow; } @hans2103 Sunday 21 April 13
  • 32. @hans2103 Hopsakee... aan de slag! gewoon beginnen Sunday 21 April 13
  • 34. @hans2103 http://www.flickr.com/photos/trasimac/1217071176 thank you for your time and have fun http://slideshare.net/hans2103 hans2103 http://about.me/hans2103 Sunday 21 April 13