SlideShare uma empresa Scribd logo
1 de 12
LESS
CSS preprocessor
Todd Shelton
Twitter: @tweenout
GitHub: TShelton41
Meetup: Dev Workshop Indy
WHAT IS A PRE-PROCESSOR
• Three major types: LESS, SaSS, Stylus
• It compiles the code we write in a processed language, LESS,
SaSS, Stylus
• Outputs the code to pure CSS
• Lets you create an OO CSS structure
• All need a tool to compile the language to CSS
What are the advantages
• They are browser compatible
• They help make your applications more modular and scalable
by using variables and other CSS properties.
• They allow us to do nesting, custom functions, math, error
checking
• Con: Takes just a little more setup than normal.
• Now lets talk about LESS
LESS - history
• Alexis Sellier is the original designer of the language
• LESS is built on JavaScript (was built on Ruby at first)
• LESS was designed to be as close to CSS as possible so that
valid CSS code is valid LESS Code
• LESS can compile real-time using LESS.js
• LESS has extensions but they are designed independentl
A more popular one is LESSHat
LESS – tools needed
• LESS can be compiled using JavaScript

• The ending file extension is .less
• You need a compiling tool

• Easier tools are out there. CodeKit(Mac), WinLess(Win),
SimpLess(both). This is just a few
• Create a less and css directory in your root folder. Then let the
tools compile your .less files into css code
LESS - setup
• We need to use just one style.less file and import all less files.
This will generate a css file named style.css
• Make sure that your compiler is pointing to your CSS folder.

• Order of importing files is very important
@import “variables.less

• Once you import all your less files you are ready to start
coding. Just remember that anytime you create a new less file.
You will need to import it. Try to make a less file for every part
of your site. OOCSS!
• Note: I have had trouble with SimpLess importing blank less files.
LESS - language
• Less is written very similar to normal CSS
p{
color: #fff;
}

• Making a variable is very easy as well
@myFontColor: #ffffff;
@myWidth: 960px;

LESS uses the @ to determine a variable or import.
LESS - language
• Using the variables. (make sure you have imported your variables.less file first)
p{
color: @myFontColor;
}

• Using Mixins (basically your custom function)
.rounded(@radius: 5px) {
border-radus: @radius;
-webkit-border-radus: @radius;
-moz-border-radus: @radius;
}
button {
.rounded(10px);
}
LESS - language
• Nesting
a{
color: @myFontColor;
&:hover {
color: @myHoverColor;
}
}

• CSS
a{
color: @myFontColor;
}
a:hover {
color: @myHoverColor;
}
LESS - language
• Using Operators
@myNumber: 2px;
.class {
width: @myNumber * 2// 4px
}

• Another usage
@myNumber: 2px;
.class {
width: ((@myNumber +3) * 2)// 10 px
}
LESS - language
• LESS Functions
@themeNavColor: #bc332d;
.class {
background-color: saturate(@themeNavColor, 10%);
}

• Another usage
@themeNavColor: #bc332d;
.class {
background-color: fadeout(@themeNavColor, 10%);
}
LESS - language
• Namespaces
#buttonBundle{
.button () {
display: inline-block;
background-color: grey;
&:hover { background-color: white }
}
}
#nav a {
#buttonBundle > .button;
}

Mais conteúdo relacionado

Mais procurados

Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.jsRyan Anklam
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3Doris Chen
 
CSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive LayoutsCSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive LayoutsSvitlana Ivanytska
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetNeha Sharma
 
Introduction to Javascript By Satyen
Introduction to Javascript By  SatyenIntroduction to Javascript By  Satyen
Introduction to Javascript By SatyenSatyen Pandya
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to ZShameem Reza
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basicsEliran Eliassy
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptWojciech Dzikowski
 
Tailwind CSS.11.pptx
Tailwind CSS.11.pptxTailwind CSS.11.pptx
Tailwind CSS.11.pptxHarish Verma
 
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)Folio3 Software
 
Tailwind CSS - KanpurJS
Tailwind CSS - KanpurJSTailwind CSS - KanpurJS
Tailwind CSS - KanpurJSNaveen Kharwar
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid LayoutRachel Andrew
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats newSandun Perera
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreBaris Ceviz
 

Mais procurados (20)

Modern UI Development With Node.js
Modern UI Development With Node.jsModern UI Development With Node.js
Modern UI Development With Node.js
 
Css to-scss
Css to-scssCss to-scss
Css to-scss
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
CSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive LayoutsCSS3 Media Queries And Creating Adaptive Layouts
CSS3 Media Queries And Creating Adaptive Layouts
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
Introduction to Javascript By Satyen
Introduction to Javascript By  SatyenIntroduction to Javascript By  Satyen
Introduction to Javascript By Satyen
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
Media queries A to Z
Media queries A to ZMedia queries A to Z
Media queries A to Z
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
.Net Core
.Net Core.Net Core
.Net Core
 
ES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern JavascriptES2015 / ES6: Basics of modern Javascript
ES2015 / ES6: Basics of modern Javascript
 
Introduction to sass
Introduction to sassIntroduction to sass
Introduction to sass
 
Tailwind CSS.11.pptx
Tailwind CSS.11.pptxTailwind CSS.11.pptx
Tailwind CSS.11.pptx
 
Css3
Css3Css3
Css3
 
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)
 
Tailwind CSS - KanpurJS
Tailwind CSS - KanpurJSTailwind CSS - KanpurJS
Tailwind CSS - KanpurJS
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats new
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 

Destaque

LESS, the CSS Preprocessor
LESS, the CSS PreprocessorLESS, the CSS Preprocessor
LESS, the CSS PreprocessorAndrea Tarr
 
Large Scale Scrum at Powerhouse.
Large Scale Scrum at Powerhouse.Large Scale Scrum at Powerhouse.
Large Scale Scrum at Powerhouse.Cesario Ramos
 
A Lean production project in software development at AlmavivA - Lean IT Summi...
A Lean production project in software development at AlmavivA - Lean IT Summi...A Lean production project in software development at AlmavivA - Lean IT Summi...
A Lean production project in software development at AlmavivA - Lean IT Summi...Institut Lean France
 
LeSS at Base Company Case Study
LeSS at Base Company Case StudyLeSS at Base Company Case Study
LeSS at Base Company Case StudyJürgen De Smet
 
Obeya - Wat is het en wat kun je er mee?
Obeya - Wat is het en wat kun je er mee?Obeya - Wat is het en wat kun je er mee?
Obeya - Wat is het en wat kun je er mee?Jostein Van Vliet
 
Less intro workshop
Less intro workshopLess intro workshop
Less intro workshopElad Sofer
 
2014 - ERP strategy - Case Study - E_____ D________
2014 - ERP strategy - Case Study - E_____ D________2014 - ERP strategy - Case Study - E_____ D________
2014 - ERP strategy - Case Study - E_____ D________Pulkit Bhatnagar
 
Lean: A strategy for the digital transformation by Régis Medina
Lean: A strategy for the digital transformation by Régis MedinaLean: A strategy for the digital transformation by Régis Medina
Lean: A strategy for the digital transformation by Régis MedinaInstitut Lean France
 
L'Obeya - Agile France 2015
L'Obeya - Agile France 2015L'Obeya - Agile France 2015
L'Obeya - Agile France 2015Operae Partners
 
Dessine moi une obeya kanban!
Dessine moi une obeya kanban!Dessine moi une obeya kanban!
Dessine moi une obeya kanban!Laurent Morisseau
 
Les obeyas chez Thales par Cécile Roche
Les obeyas chez Thales par Cécile RocheLes obeyas chez Thales par Cécile Roche
Les obeyas chez Thales par Cécile RocheInstitut Lean France
 
Une transformation digitale par le lean product engineering
Une transformation digitale par le lean product engineeringUne transformation digitale par le lean product engineering
Une transformation digitale par le lean product engineeringAntoine Contal
 
Can We Assess Creativity?
Can We Assess Creativity?Can We Assess Creativity?
Can We Assess Creativity?John Spencer
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Destaque (15)

LESS, the CSS Preprocessor
LESS, the CSS PreprocessorLESS, the CSS Preprocessor
LESS, the CSS Preprocessor
 
LESS un preprocesador CSS
LESS un preprocesador CSSLESS un preprocesador CSS
LESS un preprocesador CSS
 
Large Scale Scrum at Powerhouse.
Large Scale Scrum at Powerhouse.Large Scale Scrum at Powerhouse.
Large Scale Scrum at Powerhouse.
 
A Lean production project in software development at AlmavivA - Lean IT Summi...
A Lean production project in software development at AlmavivA - Lean IT Summi...A Lean production project in software development at AlmavivA - Lean IT Summi...
A Lean production project in software development at AlmavivA - Lean IT Summi...
 
LeSS at Base Company Case Study
LeSS at Base Company Case StudyLeSS at Base Company Case Study
LeSS at Base Company Case Study
 
Obeya - Wat is het en wat kun je er mee?
Obeya - Wat is het en wat kun je er mee?Obeya - Wat is het en wat kun je er mee?
Obeya - Wat is het en wat kun je er mee?
 
Less intro workshop
Less intro workshopLess intro workshop
Less intro workshop
 
2014 - ERP strategy - Case Study - E_____ D________
2014 - ERP strategy - Case Study - E_____ D________2014 - ERP strategy - Case Study - E_____ D________
2014 - ERP strategy - Case Study - E_____ D________
 
Lean: A strategy for the digital transformation by Régis Medina
Lean: A strategy for the digital transformation by Régis MedinaLean: A strategy for the digital transformation by Régis Medina
Lean: A strategy for the digital transformation by Régis Medina
 
L'Obeya - Agile France 2015
L'Obeya - Agile France 2015L'Obeya - Agile France 2015
L'Obeya - Agile France 2015
 
Dessine moi une obeya kanban!
Dessine moi une obeya kanban!Dessine moi une obeya kanban!
Dessine moi une obeya kanban!
 
Les obeyas chez Thales par Cécile Roche
Les obeyas chez Thales par Cécile RocheLes obeyas chez Thales par Cécile Roche
Les obeyas chez Thales par Cécile Roche
 
Une transformation digitale par le lean product engineering
Une transformation digitale par le lean product engineeringUne transformation digitale par le lean product engineering
Une transformation digitale par le lean product engineering
 
Can We Assess Creativity?
Can We Assess Creativity?Can We Assess Creativity?
Can We Assess Creativity?
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Semelhante a Less presentation

Less(CSS Pre Processor) Introduction
Less(CSS Pre Processor) IntroductionLess(CSS Pre Processor) Introduction
Less(CSS Pre Processor) Introductionrushi7567
 
LESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionLESS(CSS Pre Processor) introduction
LESS(CSS Pre Processor) introductionrushi7567
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Using Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsUsing Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsJeremy Green
 
Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSdotCMS
 
Markup languages and warp-speed documentation
Markup languages and warp-speed documentationMarkup languages and warp-speed documentation
Markup languages and warp-speed documentationLois Patterson
 
Lois Patterson: Markup Languages and Warp-Speed Documentation
Lois Patterson:  Markup Languages and Warp-Speed DocumentationLois Patterson:  Markup Languages and Warp-Speed Documentation
Lois Patterson: Markup Languages and Warp-Speed DocumentationJack Molisani
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseSteve Reiner
 
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/12ucbdrupal
 
Less\sass done right in .NET
Less\sass done right in .NETLess\sass done right in .NET
Less\sass done right in .NETPawelPabich
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptxStefan Oprea
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with GruntLadies Who Code
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Campcanarymason
 

Semelhante a Less presentation (20)

Less
LessLess
Less
 
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
 
UNIT 3.ppt
UNIT 3.pptUNIT 3.ppt
UNIT 3.ppt
 
Sass is dead
Sass is deadSass is dead
Sass is dead
 
LESS CSS
LESS CSSLESS CSS
LESS CSS
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Using Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsUsing Sass in Your WordPress Projects
Using Sass in Your WordPress Projects
 
Going Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMSGoing Multi-Tenant with dotCMS
Going Multi-Tenant with dotCMS
 
Markup languages and warp-speed documentation
Markup languages and warp-speed documentationMarkup languages and warp-speed documentation
Markup languages and warp-speed documentation
 
Lois Patterson: Markup Languages and Warp-Speed Documentation
Lois Patterson:  Markup Languages and Warp-Speed DocumentationLois Patterson:  Markup Languages and Warp-Speed Documentation
Lois Patterson: Markup Languages and Warp-Speed Documentation
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
 
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
 
Less\sass done right in .NET
Less\sass done right in .NETLess\sass done right in .NET
Less\sass done right in .NET
 
Sass
SassSass
Sass
 
Web technologies-course 05.pptx
Web technologies-course 05.pptxWeb technologies-course 05.pptx
Web technologies-course 05.pptx
 
The Three Musketeers
The Three MusketeersThe Three Musketeers
The Three Musketeers
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
 
The Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital CampThe Coding Designer's Survival Kit - Capital Camp
The Coding Designer's Survival Kit - Capital Camp
 

Último

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
🐬 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 convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
🐬 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 convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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...
 
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
 
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
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Less presentation

  • 1. LESS CSS preprocessor Todd Shelton Twitter: @tweenout GitHub: TShelton41 Meetup: Dev Workshop Indy
  • 2. WHAT IS A PRE-PROCESSOR • Three major types: LESS, SaSS, Stylus • It compiles the code we write in a processed language, LESS, SaSS, Stylus • Outputs the code to pure CSS • Lets you create an OO CSS structure • All need a tool to compile the language to CSS
  • 3. What are the advantages • They are browser compatible • They help make your applications more modular and scalable by using variables and other CSS properties. • They allow us to do nesting, custom functions, math, error checking • Con: Takes just a little more setup than normal. • Now lets talk about LESS
  • 4. LESS - history • Alexis Sellier is the original designer of the language • LESS is built on JavaScript (was built on Ruby at first) • LESS was designed to be as close to CSS as possible so that valid CSS code is valid LESS Code • LESS can compile real-time using LESS.js • LESS has extensions but they are designed independentl A more popular one is LESSHat
  • 5. LESS – tools needed • LESS can be compiled using JavaScript • The ending file extension is .less • You need a compiling tool • Easier tools are out there. CodeKit(Mac), WinLess(Win), SimpLess(both). This is just a few • Create a less and css directory in your root folder. Then let the tools compile your .less files into css code
  • 6. LESS - setup • We need to use just one style.less file and import all less files. This will generate a css file named style.css • Make sure that your compiler is pointing to your CSS folder. • Order of importing files is very important @import “variables.less • Once you import all your less files you are ready to start coding. Just remember that anytime you create a new less file. You will need to import it. Try to make a less file for every part of your site. OOCSS! • Note: I have had trouble with SimpLess importing blank less files.
  • 7. LESS - language • Less is written very similar to normal CSS p{ color: #fff; } • Making a variable is very easy as well @myFontColor: #ffffff; @myWidth: 960px; LESS uses the @ to determine a variable or import.
  • 8. LESS - language • Using the variables. (make sure you have imported your variables.less file first) p{ color: @myFontColor; } • Using Mixins (basically your custom function) .rounded(@radius: 5px) { border-radus: @radius; -webkit-border-radus: @radius; -moz-border-radus: @radius; } button { .rounded(10px); }
  • 9. LESS - language • Nesting a{ color: @myFontColor; &:hover { color: @myHoverColor; } } • CSS a{ color: @myFontColor; } a:hover { color: @myHoverColor; }
  • 10. LESS - language • Using Operators @myNumber: 2px; .class { width: @myNumber * 2// 4px } • Another usage @myNumber: 2px; .class { width: ((@myNumber +3) * 2)// 10 px }
  • 11. LESS - language • LESS Functions @themeNavColor: #bc332d; .class { background-color: saturate(@themeNavColor, 10%); } • Another usage @themeNavColor: #bc332d; .class { background-color: fadeout(@themeNavColor, 10%); }
  • 12. LESS - language • Namespaces #buttonBundle{ .button () { display: inline-block; background-color: grey; &:hover { background-color: white } } } #nav a { #buttonBundle > .button; }

Notas do Editor

  1. Talk about my selfWorkSchoolInteractive wall displayFlash/FlexNew LanguagesStyling in Flash verses webNew CSS