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
  • Feedback & Rating feedback
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

Value escaping with the ~"value" syntax


The ~"value" syntax for value escaping can be used to assign a value to a property that is not recognized by Less. Less only accepts a valid CSS syntax for property values.

Getting ready

For this recipe, you will have to create a gradient.less file and an index.html file, which load the Less file and less.js compiler with the following code in the head section:

<link rel="stylesheet/less" type="text/css" href="gradient.less">
<script src="less.js" type="text/javascript"></script>

How to do it…

  1. Write the following Less code into your gradient.less file:

    .gradient {
      background-image:linear-gradient(to bottom, red, yellow); 
      background-repeat: repeat-x;
      filter: ~"-progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffff00')";
    }
  2. Add some header elements to your index.html file, as follows:

    <header><h1>Page header</h1></header>
    <section><header><h2>Article header...
Visually different images
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