Less Web Development Essentials

Less Web Development Essentials
eBook: $17.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $47.98    Print cover: $29.99
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Produce clear, concise, and well-constructed code that compiles into standard compliant CSS
  • Explore the core attributes of Less and learn how to integrate them into your site
  • Optimize Twitter's Bootstrap to efficiently develop web apps and sites

Book Details

Language : English
Paperback : 202 pages [ 235mm x 191mm ]
Release Date : April 2014
ISBN : 1783981466
ISBN 13 : 9781783981465
Author(s) : Bass Jobsen
Topics and Technologies : All Books, Web Development, Open Source

Table of Contents

Chapter 1: Improving Web Development with Less
Chapter 2: Using Variables and Mixins
Chapter 3: Nested Rules, Operations, and Built-in Functions
Chapter 4: Avoid Reinventing the Wheel
Chapter 5: Integrate Less in Your Own Projects
Chapter 6: Bootstrap 3, WordPress, and Other Applications
  • Chapter 1: Improving Web Development with Less
    • Using CSS3 for styling your HTML
      • Using CSS Selectors to style your HTML
      • Specificity, Inheritance, and Cascade in CSS
        • How CSS specificity works
      • Building your layouts with flexible boxes
    • Compiling Less
      • Getting started with Less
      • Using the watch function for automatic reloading
      • Debugging your code
        • Example code used in this book
    • Your first layout in Less
      • Vendor-specific rules
      • Build rounded corners with border-radius
    • Preventing cross-browser issues with CSS resets
      • Creating background gradients
    • CSS transitions, transformations, and animations
    • Box-sizing
    • Server-side compiling
      • Compressing and minimizing your CSS
      • Graphical user interfaces
    • Summary
  • Chapter 2: Using Variables and Mixins
    • Comments
      • Nested comments
      • Special comments
    • Variables
      • Organizing your files
      • Naming your variables
      • Using a variable
      • Organizing variables
      • The last declaration wins
      • Variable declaration is not static
      • Lazy loading
    • Escaping values
    • Mixins
      • Basic mixins
      • Parametric mixins
        • Default values
      • Naming and calling
      • Multiple parameters
      • More complex mixins for linear gradient backgrounds
      • Special variables – @arguments and @rest
      • Return values
      • Changing the behavior of a mixin
        • Switches
        • Argument matching
        • Guarded mixins
        • Using guards and argument matching to construct loops
      • The !important keyword
    • Summary
  • Chapter 3: Nested Rules, Operations, and Built-in Functions
    • The navigation structure
    • Nested rules
      • Mixins and classes
      • Variables
      • Classes and namespaces
    • Operating on numbers, colors, and variables
    • The & symbol
    • Property merging
    • Built-in functions
      • JavaScript
      • List functions
      • Using color functions
      • The darken() and lighten() functions
      • Color manipulation
        • Color operations
      • Color blending with Less
      • Type functions
    • The box-shadow mixin
    • Summary
  • Chapter 4: Avoid Reinventing the Wheel
    • Revisiting background gradients
      • Unused code
        • Chrome's developer tools
        • Firebug CSS usage add-on
    • Testing your code
      • Understanding TDD
      • All about style guides
        • Building a style guide with StyleDocco
        • Testing your code with tdcss.js
    • Prebuilt mixins
      • Using single-line declarations for vendor-specific rules with Less Elements
      • Less Hat – a comprehensive library of mixins
      • Using the 3L library of prebuilt mixins
        • SEO and HTML debugging
      • ClearLess – another library of prebuilt mixins
      • Using Preboot's prebuilt mixins for your project
    • Integrating other techniques into your projects using Less
      • Using iconic fonts
      • Retina.js
    • Summary
  • Chapter 5: Integrate Less in Your Own Projects
    • Importing CSS into Less
      • Using the @import rule
    • Migrating your project
      • Organizing your files
      • Converting CSS code to Less code
    • Media queries and responsive design
      • Making your layout fluid
        • Testing your layouts on a mobile phone
        • Coding first for mobile
    • Using grids in your designs and work flow
      • The role of CSS float in grids
        • Making your grid responsive
        • The role of the clearfix
      • Using a more semantic strategy
      • Building your layouts with grid classes
      • Building nested grids
      • Alternative grids
    • Building your project with a responsive grid
      • Using Preboot's grid system
    • Using the grid mixins to build a semantic layout
    • Extending your grids
      • Adding grid classes for the small grid
      • Applying the small grid on your semantic code
    • Summary
  • Chapter 6: Bootstrap 3, WordPress, and Other Applications
    • Bootstrap 3
      • Working with Bootstrap's Less files
        • Building a Bootstrap project with Grunt
        • Compiling your Less files
        • Dive into Bootstrap's Less files
        • Creating a custom button with Less
        • Customizing Bootstrap's navbar with Less
        • Bootstrap classes and mixins
        • Theming Bootstrap with Less
        • The a11y theme for Bootstrap
        • Color schemes with 1pxdeep
      • Using Bootstrap's customizer to build your own version
    • Semantic UI – another Less framework
      • Automatic prefixing of vendor-specific rules
    • Other frameworks to build your grid with Less
      • Using the Golden Grid System to build your grids
      • The Semantic Grid System
    • WordPress and Less
      • Using the Roots theme with Less
      • JBST with a built-in Less compiler
      • The Semantic UI WordPress theme
      • WordPress plugins and Less
        • Theme WooCommerce with Less
        • The WP Less to CSS plugin
    • Alternative compilers for compiling your Less code
      • The Less.php compiler
      • The .less compiler for .NET apps
      • List of tools to develop Less
    • Summary

Bass Jobsen

Bass Jobsen has been programming for the Web since 1995, from C to PHP, always looking for the most accessible interfaces. He has a special interest in the process between a designer and programmer. He believes that interfaces should work independent of a device or browser. For these reasons, working with grids and meta languages in designs makes him happy. He always looks forward to new opportunities in the Semantic and Responsive Web.

He uses Less in his daily job for web design tasks and WordPress theme development as well as other Twitter Bootstrap apps.

He is always happy to help you. He can be reached at http://stackoverflow.com/users/1596547/bass-jobsen.

Currently, he writes a blog (http://bassjobsen.weblogs.fm/), programs LBS for mobile devices (http://www.gizzing.nl), makes cool websites (such as http://www.streetart.nl/), and counsels Jamedo Websites (http://www.jamedowebsite.nl/) in setting up the technical environment and requirements for their business.

You can also check out his Bootstrap WordPress Starters Theme (JBST) and other projects at GitHub at https://github.com/bassjobsen.

"I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it."
                                                                                                                                  –Bill Gates

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Less Web Development Essentials +    Bootstrap Site Blueprints =
50% Off
the second eBook
Price for both: $31.95

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Compile Less code into readable and maintainable CSS
  • Integrate Less into your own projects
  • Reuse your code to prevent code duplications
  • Reduce the development and maintenance time of your projects
  • Use variables and mixins to write reusable and portable code
  • Build a responsive grid with Less to create beautifully responsive site layouts
  • Customize Twitter's Bootstrap 3 with Less

In Detail

Less is a CSS preprocessor that essentially improves the functionality of simple CSS with the addition of several features. The book begins by teaching you how Less facilitates the process of web development. You will quickly then move on to actually creating your first layout using Less and compiling your very first Less code.

Next, you will learn about variables and mixins and how they will help in building robust CSS code. In addition, you'll learn how to keep your code clean and test it by using style guides. We will then move on to the concept of Bootstrapping and the strength of using Less with Twitter Bootstrap. Going one step further, you will be able to customize Twitter's Bootstrap 3 using Less.

Finally, you will learn how to integrate Less into your WordPress themes and explore other web apps that use Less. By leveraging this powerful CSS preprocessor, you will be able to consistently produce amazing web applications while making CSS code development an enjoyable experience.


Written in a practical and concise manner, this book is a crash-course in teaching you the fundamental concepts of Less with real-life examples and problems.

Who this book is for

If you use CSS3 in your web development tasks and want to create maintainable and reusable code with Less, this book is ideal for you. Although you need to have some experience in web development, even beginners will find this book useful.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software