官术网_书友最值得收藏!

Summary

We're now ready to start exploring the Less syntax in more detail. Before we do so, let's recap what we learned throughout this chapter.

We began with how you can download and install Less; we first covered how you can download this as a standalone library, before incorporating it into our pages. We also took a brief look at how you can use a CDN link instead of downloading the code; while this isn't recommended for development purposes, it nevertheless is worthwhile for production sites, where the browser can cache the library if a visitor has already accessed the library on a previous site.

Moving on, we then took a look at how you install Less server-side, using the Node platform. We saw how easy it is to compile Less files, using a single command, and that we can perform this as many times as we like, by rerunning the command when needed. We discussed how to install Less by taking a look at the dangers of using it client side and how this should really be limited to use in a development environment only, due to the extra demands placed on the hosting server.

We then changed focus and took a whistle-stop tour on some of the key parts of the Less syntax, as a precursor to exploring it in more detail in later chapters. We covered the use of variables, mixins, nesting, operations, and extending in Less before switching to compiling some basic code to see how the compilation process works. We examined how you can use either a standalone compiler or the command line to perform the same operation. We finished the chapter with a look at how to use the watch() function within Less—this can be set to watch for any changes in the Less file and force the browser to automatically refresh the page, without the need for manual intervention.

We've now covered the basics of how to install Less and get it up and running in our code. Let's move on and begin our journey through the functionality of Less, starting with a look at mixins, functions, and variables.

主站蜘蛛池模板: 绵竹市| 广灵县| 石家庄市| 漳州市| 磐石市| 娱乐| 徐闻县| 灵台县| 肥西县| 平武县| 金塔县| 台安县| 邛崃市| 洛浦县| 嵊州市| 沙洋县| 永川市| 兴文县| 兴隆县| 财经| 灵璧县| 锦州市| 河东区| 尖扎县| 莱西市| 固安县| 和静县| 湘潭县| 武城县| 黄陵县| 潜江市| 武冈市| 定襄县| 潼关县| 启东市| 建平县| 义乌市| 六安市| 鹤壁市| 威海市| 泗水县|