cole007 / better-css-with-sass Goto Github PK
View Code? Open in Web Editor NEWFeedback for the Better CSS with Sass
Feedback for the Better CSS with Sass
The term “parent selector” is misleading, especially for beginners. I recommend talking about a “reference to parent”, or something alike.
Find a more appropriate way to call “parent selector” to avoid any confusion.
Change “sass.css.map” into “style.css.map”
Change:
$base-font-size: 16;
@mixin font-size($size) {
font-size: $size + px;
font-size: ($size / $base-font-size) + rem; }
Into:
@mixin font-size($size, $base-font-size: 16) {
font-size: $size + px;
font-size: ($size / $base-font-size) + rem; }
Change:
$mixin mixin-name($variable) {
output stuff here;
}
Into:
$mixin mixin-name($variable) {
// output stuff here
}
While both hyphens and underscores are strictly equivalent in Sass, it is considered a bit of a bad practice to use underscore in place of hyphens.
Change map_get
into map-get
. Funny thing is you use hyphen starting page 80.
I think you are already aware of this one.
Change:
.article {
margin: 20px 0;
&__image {
width: 40%; }
&--small {
width: 20%; }}
Into:
.article {
margin: 20px 0;
&__image {
width: 40%;
&--small {
width: 20%; }}}
I believe all of these should be wrapped code tags.
Remove second occurrence.
17 and 19.
So we’ve got Sass installed, we know how to convert Sass (or .scss) files into CSS, and we can use our existing CSS, which will process just fine into Sass. But where’s the fun in that? In the next chapter, I will start to look at some of the things we can do in Sass that we can’t do in CSS.
Change “Scss” in “SCSS”.
Change “division (/
) and subtraction (-
)” into “division (/
), subtraction (-
) and modulo (%
)”.
Parameters are what's in a function signature. Arguments are what's being passed to a function call.
Change “(called arguments)” into “ (called parameters)”.
Change:
.alert-box
color: #dd0000;
border: 1px solid #dd0000;
Into:
.alert-box
color: #dd0000
border: 1px solid #dd0000
Quote all strings in Sass.
Do not append the unit directly. Multiple by one member of the unit instead.
See: http://www.sitepoint.com/understanding-sass-units/.
Add or remove spaces where needed.
(24/ $size)
” -> “(24 / $size)
”#{ index($pages, $item)}
” -> “#{index($pages, $item)}
”#{ $key}
” -> “#{$key}
”#{ $media}
” -> “#{$media}
”#{$property }
” -> “#{$property}
” (2 times)background-color,$red
” -> “background-color, $red
”rgba (255, 0, 0, 0.75);
” -> “rgba(255, 0, 0, 0.75);
”$pages,news
” -> “$pages, news
” (3 times)Change “colour
” into “color
”.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.