Commit d6b8ada
committed
Merge branch master from airbnb/css (#1)
* Advise against @extend, enable SCSS-lint ExtendDirective
@extend is unintuitive and dangerous, so we are recommending against its
use. As part of this commit, I enabled the SCSS-lint linter that will
warn against its use. I also revised content that mentioned @extend, to
maintain philosophical consistency.
* Add section about mixins
In my previous commit, I revised this document to advise against using
@extend, which included removing the section about mixins because it
only existed to recommend against using argumentless mixins in favor of
@extend. However, this document feels a bit incomplete without some
guidance on mixin usage, so I am adding a few sentences here.
* Prefer `border: 0` over `border: none`
Although the scss-lint configuration file here enforced `border: none`,
we chatted about it and agreed that we prefer `border: 0`.
* Default scss-lint severity to error
scss-lint 0.44.0 added a global severity configuration setting. Since
warnings are often ignored, we want to set this to error by default.
* Add section about using dash-cased for variable names
We want people to use a consistent style for variable names. We believe
that simple rules are most likely to be followed, and that consistency
is good, so we are settling on dash-cased, which is what we use for
everything else, such as classes, mixins, functions, and properties.
Along with this change, I am explicitly enabling the NameFormat
SCSS-Lint rule which enforces this style. Note that this is enabled in
SCSS-Lint by default, so this is functionally no different, but it is
good to be explicit about things.
* Enable PrivateNamingConvention scss-lint rule
Since we mention that prefixing names with underscores is an acceptable
way to denote that they are private, we want to enforce that they are
defined within the same file that they are used. The new
PrivateNamingConvention rule in scss-lint is designed for this purpose.
* Update README.md
Add Chinese(Simplified) Translation.1 parent bf1e947 commit d6b8ada
2 files changed
+55
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
16 | 28 | | |
17 | 29 | | |
18 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
172 | 195 | | |
173 | 196 | | |
174 | 197 | | |
175 | 198 | | |
176 | 199 | | |
177 | | - | |
| 200 | + | |
178 | 201 | | |
179 | 202 | | |
180 | 203 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 204 | + | |
193 | 205 | | |
194 | | - | |
| 206 | + | |
195 | 207 | | |
196 | 208 | | |
197 | 209 | | |
198 | | - | |
199 | 210 | | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
204 | 215 | | |
205 | | - | |
| 216 | + | |
206 | 217 | | |
207 | | - | |
| 218 | + | |
208 | 219 | | |
209 | 220 | | |
210 | 221 | | |
211 | | - | |
212 | 222 | | |
213 | 223 | | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
217 | 227 | | |
218 | 228 | | |
219 | | - | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
224 | 234 | | |
225 | | - | |
226 | 235 | | |
227 | 236 | | |
228 | 237 | | |
| |||
233 | 242 | | |
234 | 243 | | |
235 | 244 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 245 | + | |
245 | 246 | | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 249 | + | |
266 | 250 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 251 | + | |
272 | 252 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 253 | + | |
276 | 254 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 255 | + | |
281 | 256 | | |
282 | 257 | | |
283 | 258 | | |
| |||
303 | 278 | | |
304 | 279 | | |
305 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
0 commit comments