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

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.

主站蜘蛛池模板: 永寿县| 紫阳县| 德阳市| 浠水县| 栾城县| 化州市| 瓦房店市| 共和县| 焦作市| 洛隆县| 湖南省| 柳江县| 梅州市| 阳信县| 武汉市| 建始县| 江山市| 信丰县| 龙口市| 马龙县| 巫溪县| 蒙山县| 郓城县| 永修县| 长乐市| 乌兰浩特市| 黄浦区| 会宁县| 红河县| 马鞍山市| 台南县| 禄丰县| 泉州市| 临猗县| 辽阳市| 鱼台县| 蓝田县| 海安县| 比如县| 周口市| 岳普湖县|