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

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.

主站蜘蛛池模板: 喜德县| 祁东县| 股票| 石柱| 盐山县| 安福县| 县级市| 仁布县| 桐梓县| 宜州市| 滕州市| 丹东市| 南乐县| 长治县| 英吉沙县| 福海县| 湘阴县| 封开县| 朝阳市| 阜阳市| 阿克陶县| 珲春市| 定日县| 胶南市| 库尔勒市| 新乐市| 韶关市| 客服| 忻城县| 淮滨县| 黄大仙区| 阿拉尔市| 郓城县| 白河县| 馆陶县| 大埔区| 紫阳县| 遵义市| 邓州市| 双城市| 东城区|