原文鏈接:鏈接描述
Syntax and FormattingAt a very high-level, we want
two (2) space indents, no tabs;
80 character wide columns;
multi-line CSS;
meaningful use of whitespace.
But, as with anything, the specifics are somewhat irrelevant—consistency is key.
Multiple FilesWith the meteoric rise of preprocessors of late, more often is the case that developers are splitting CSS across multiple files.
Even if not using a preprocessor, it is a good idea to split discrete chunks of code into their own files, which are concatenated during a build step.
Table of ContentsAn up-to-date table of contents provides a team with a single, canonical catalogue of what is in a CSS project, what it does, and in what order.
A simple table of contents will—in order, naturally—simply provide the name of the section and a brief summary of what it is and does.
Naturally, this section would be substantially larger on the majority of projects, but hopefully we can see how this section—in the master stylesheet—provides developers with a project-wide view of what is being used where, and why.
80 Characters Wide Meaningful WhitespaceOne (1) empty line between closely related rulesets.
Two (2) empty lines between loosely related rulesets.
Five (5) empty lines between entirely new sections.
HTMLWhen writing multiple values in a class attribute, separate them with two spaces
When multiple classes are related to each other, consider grouping them in square brackets ([ and ])
As with our rulesets, it is possible to use meaningful whitespace in your HTML. You can denote thematic breaks in content with five (5) empty lines
Separate independent but loosely related snippets of markup with a single empty line
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/115446.html
摘要:陰影距離原位置的垂直位移,正數(shù)表示向下移動(dòng),負(fù)數(shù)表示向上移動(dòng)。實(shí)現(xiàn)原理純個(gè)人理解創(chuàng)建一個(gè)與元素尺寸一致的陰影盒子將陰影盒子定位到于元素重合,并位于元素之上水平和垂直各畫兩條線,分別跟元素重合共條分別記為根據(jù)和移動(dòng)。 前言 說(shuō)起box-shadow那第一個(gè)想法當(dāng)然就是用來(lái)實(shí)現(xiàn)陰影,其實(shí)它還能用于實(shí)現(xiàn)其他好玩的效果的,本篇就打算說(shuō)說(shuō)box-shadow的那些事。 二話不說(shuō)看效果 showI...
摘要:第一部分介紹了如何使用和開發(fā)接口。由于系統(tǒng)變得越來(lái)越復(fù)雜,人們提出了稱為預(yù)處理器和后處理器的工具來(lái)管理復(fù)雜性。當(dāng)您第一次得知有預(yù)處理器和后處理器時(shí),你很有可能在任何地方已經(jīng)使用它們。我之前建議的文章,,也涵蓋了預(yù)處理器相關(guān)的知識(shí)。 我記得我剛開始學(xué)習(xí)前端開發(fā)的時(shí)候。我看到了很多文章及資料,被學(xué)習(xí)的資料壓得喘不過(guò)氣來(lái),甚至不知道從哪里開始。 本指南列出前端學(xué)習(xí)路線,并提供了平時(shí)收藏的一些...
摘要:取自我的的,歡迎,歡迎。原不定期更新,此文可能斷更。最新更新時(shí)間。前端資源中文平時(shí)開發(fā)和學(xué)習(xí)過(guò)程中自己收集的一些前端資源。自行取用,不斷更新。你也可以關(guān)注我從而在我的點(diǎn)贊中了解到更多有意思的項(xiàng)目。前端之路,且行且珍惜。 取自 我的GITHUB 的 fe-store-house repo,歡迎 PR,歡迎 STAR。原 repo 不定期更新,此文可能斷更。斷更了一年多,重新更新一下,似乎...
閱讀 769·2021-11-23 09:51
閱讀 835·2021-11-23 09:51
閱讀 2503·2021-11-15 18:01
閱讀 3864·2021-10-11 11:07
閱讀 2397·2021-09-22 15:30
閱讀 1075·2021-09-22 14:59
閱讀 1557·2019-08-30 15:55
閱讀 1753·2019-08-30 15:52