Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying LESS WEB DEVELOPMENT COOKBOOK
  • Table Of Contents Toc
LESS WEB DEVELOPMENT COOKBOOK

LESS WEB DEVELOPMENT COOKBOOK

By : Jobsen, Meyghani
5 (1)
close
close
LESS WEB DEVELOPMENT COOKBOOK

LESS WEB DEVELOPMENT COOKBOOK

5 (1)
By: Jobsen, Meyghani

Overview of this book

Aimed at those who want to overcome the limitations of CSS, through this book you will begin to harness the efficiency of Less by building advanced, responsive, and modern websites. Experienced web developers, students, and even web designers will find this guide very useful as they enhance their CSS skills.
Table of Contents (13 chapters)
close
close
12
Index

Commenting your code in Less

Commenting your code will help you and others to better understand the code. If you or someone else have to change your code, maybe after a long period since the code was written, the comments should clarify what a block of code does and why it was added in the first place.

Getting ready

In this recipe, you will need a randomly chosen Less file without a comment. If you don't have such a file, you can create one yourself.

How to do it…

  1. Open your Less file.
  2. Then, start adding comments.

    Both Less and CSS allow you to use block-level comments that start with /* and end with */. The following code will show you an example of a block-level comment:

    /*
    * Example code for Less Cookbook
    * copyright 2014 by Bass Jobsen
    */

    In contrast to CSS, Less allows single-line comments. A single-line comment starts with //, as shown in the following example code:

    @menuColor: red; //sets the background color for the menu

Note

Note that you cannot nest two or more block-level comments...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
LESS WEB DEVELOPMENT COOKBOOK
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon