Learning Less.js

Develop attractive CSS styles efficiently, using the Less CSS preprocessor

Learning Less.js

This ebook is included in a Mapt subscription
Alex Libby

Develop attractive CSS styles efficiently, using the Less CSS preprocessor
$0.00
$26.99
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781782160663
Paperback342 pages

Book Description

Writing CSS styles can be very tedious–how many times have you written CSS styles that become difficult to read and manage, and frequently have to be duplicated? Less gives you a solid toolkit that can help streamline your code when developing styles for any website of any size, with a significant reduction in the amount of time and effort required.

Learning Less.js helps you maximize your experience with the Less library by breaking down each of its main features. This book walks you through examples that progressively build upon your knowledge, taking you from beginner to advanced usage in a series of easy-to-follow steps. We begin with exploring the library, and will learn about the tricks it uses to help us save development time when creating and managing styles, right through to using Less.js in some practical, real-world scenarios.

Table of Contents

Chapter 1: Introducing Less
The role of HTML and CSS
The limitations of using CSS
The benefits of using CSS preprocessors
Introducing Less as a solution
Why you should use Less
Supporting CSS4 standards within Less
Summary
Chapter 2: Building a Less Development Toolkit
Choosing an IDE or editor
Compiling Less files with a standalone compiler
Compiling from the command line
Debugging Less in browsers
Other useful tools
Summary
Chapter 3: Getting Started with Less
Creating the foundation page
Downloading and installing Less
Installing Less on the client side
Installing Less on the server side
The dangers of using Less on the client side
Exploring the syntax used by Less
Compiling the code and viewing results
Using the command-line compiler
Watching for changes in Watch mode
Summary
Chapter 4: Working with Variables, Mixins, and Functions
Discovering variables in Less
Exploring mixins
Creating a web form
Adding basic mixins
Developing parametric mixins
Creating mixins as functions
Using external libraries
Introducing functions
Summary
Chapter 5: Inheritance, Overriding, and Nesting in Less
Nesting styles in Less
Inheriting and overriding styles with extend
Namespacing in Less
Lazy loading of variables in Less
Importing style sheets into Less
Avoiding code bloat
Summary
Chapter 6: Migrating Your Site to Less
Preparing for the initial jump
Creating the initial framework
Spotting low-hanging fruit
Identifying patterns in your CSS
Using prebuilt mixin libraries
Building a library of mixins
Working through a practical example
Viewing the finished article
Summary
Chapter 7: Manipulating Fonts with Less
Creating simple font mixins
Using @font-face with Less
Using a prebuilt library to handle fonts
Using variables to calculate sizes
Handling different weights
Working with @media in Less
Creating special effects using Less
Summary
Chapter 8: Media Queries with Less
Introducing media queries
The limitations of CSS
Setting client criteria
Exploring media queries
Exploring media features
Designing media queries
Using tools to resize the screen
Using prebuilt libraries
Summary
Chapter 9: Working with Less in a CMS
Introducing the WP theme structure
Preparing our environment
Creating a basic child theme
Adding support for Less in WordPress
Adding Less support using a plugin
Working with Less themes in WordPress
Automating WordPress development
Summary
Chapter 10: Using Bootstrap with Less
Dissecting Bootstrap's Less file structure
Configuring Bootstrap for your site
Building a more realistic site
Compiling the Bootstrap CSS and JavaScript
Examining Bootstrap's mixins
Dissecting Bootstrap's mixins
Dissecting Bootstrap's theme mixins
Customizing our download
Developing a workflow for using Bootstrap
Summary
Chapter 11: Abstracting CSS Frameworks with Less
Discovering what's wrong with using frameworks
Diagnosing the problem
Fixing the code
Simplifying complex styles
Summary
Chapter 12: Color Processing with Less
Introducing color management in Less
Examining color spaces and formats
Working with color functions
Color blending
Introducing palettes
Summary
Chapter 13: Animation with Less
Introducing animations
Creating a good animation
How a CSS animation works
Introducing animation types
Simplifying the animation markup with Less
Creating animated menus
Libraries using Less
Using CSS or JavaScript
Improving the animation's performance
Summary
Chapter 14: Extending and Contributing to Less
Locating the Less repositories
Finding and reporting issues in Less
Reporting bugs in the library
Contributing to the Less source
Contributing to the Less documentation
Working to coding guidelines
Summary

What You Will Learn

  • Explore the different features of the Less library
  • Build an effective toolkit that helps in your development workflow, using different tools in Less
  • Streamline the effort required when constructing themes for content management systems, such as WordPress, using Less
  • Discover how you can use Less to make frameworks work for you in an effective way
  • Enhance the use of Less when working with color, one of the key elements of website design
  • Work with Less to reduce the effort required to construct responsive websites
  • Add flair to your website or online application with animation effects using Less

Authors

Table of Contents

Chapter 1: Introducing Less
The role of HTML and CSS
The limitations of using CSS
The benefits of using CSS preprocessors
Introducing Less as a solution
Why you should use Less
Supporting CSS4 standards within Less
Summary
Chapter 2: Building a Less Development Toolkit
Choosing an IDE or editor
Compiling Less files with a standalone compiler
Compiling from the command line
Debugging Less in browsers
Other useful tools
Summary
Chapter 3: Getting Started with Less
Creating the foundation page
Downloading and installing Less
Installing Less on the client side
Installing Less on the server side
The dangers of using Less on the client side
Exploring the syntax used by Less
Compiling the code and viewing results
Using the command-line compiler
Watching for changes in Watch mode
Summary
Chapter 4: Working with Variables, Mixins, and Functions
Discovering variables in Less
Exploring mixins
Creating a web form
Adding basic mixins
Developing parametric mixins
Creating mixins as functions
Using external libraries
Introducing functions
Summary
Chapter 5: Inheritance, Overriding, and Nesting in Less
Nesting styles in Less
Inheriting and overriding styles with extend
Namespacing in Less
Lazy loading of variables in Less
Importing style sheets into Less
Avoiding code bloat
Summary
Chapter 6: Migrating Your Site to Less
Preparing for the initial jump
Creating the initial framework
Spotting low-hanging fruit
Identifying patterns in your CSS
Using prebuilt mixin libraries
Building a library of mixins
Working through a practical example
Viewing the finished article
Summary
Chapter 7: Manipulating Fonts with Less
Creating simple font mixins
Using @font-face with Less
Using a prebuilt library to handle fonts
Using variables to calculate sizes
Handling different weights
Working with @media in Less
Creating special effects using Less
Summary
Chapter 8: Media Queries with Less
Introducing media queries
The limitations of CSS
Setting client criteria
Exploring media queries
Exploring media features
Designing media queries
Using tools to resize the screen
Using prebuilt libraries
Summary
Chapter 9: Working with Less in a CMS
Introducing the WP theme structure
Preparing our environment
Creating a basic child theme
Adding support for Less in WordPress
Adding Less support using a plugin
Working with Less themes in WordPress
Automating WordPress development
Summary
Chapter 10: Using Bootstrap with Less
Dissecting Bootstrap's Less file structure
Configuring Bootstrap for your site
Building a more realistic site
Compiling the Bootstrap CSS and JavaScript
Examining Bootstrap's mixins
Dissecting Bootstrap's mixins
Dissecting Bootstrap's theme mixins
Customizing our download
Developing a workflow for using Bootstrap
Summary
Chapter 11: Abstracting CSS Frameworks with Less
Discovering what's wrong with using frameworks
Diagnosing the problem
Fixing the code
Simplifying complex styles
Summary
Chapter 12: Color Processing with Less
Introducing color management in Less
Examining color spaces and formats
Working with color functions
Color blending
Introducing palettes
Summary
Chapter 13: Animation with Less
Introducing animations
Creating a good animation
How a CSS animation works
Introducing animation types
Simplifying the animation markup with Less
Creating animated menus
Libraries using Less
Using CSS or JavaScript
Improving the animation's performance
Summary
Chapter 14: Extending and Contributing to Less
Locating the Less repositories
Finding and reporting issues in Less
Reporting bugs in the library
Contributing to the Less source
Contributing to the Less documentation
Working to coding guidelines
Summary

Book Details

ISBN 139781782160663
Paperback342 pages
Read More

Read More Reviews