mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 15:51:41 +03:00
Merge pull request #1882 from Pink401k/sass
[sass/en] Cleaning up wording and formatting
This commit is contained in:
commit
5fcdfdf06c
@ -4,15 +4,16 @@ filename: learnsass.scss
|
||||
contributors:
|
||||
- ["Laura Kyle", "https://github.com/LauraNK"]
|
||||
- ["Sean Corrales", "https://github.com/droidenator"]
|
||||
- ["Kyle Mendes", "https://github.com/pink401k"]
|
||||
---
|
||||
|
||||
Sass is a CSS extension language that adds features such as variables, nesting, mixins and more.
|
||||
Sass (and other preprocessors, such as [Less](http://lesscss.org/)) help developers to write maintainable and DRY (Don't Repeat Yourself) code.
|
||||
Sass (and other preprocessors, such as [Less](http://lesscss.org/)) help developers write maintainable and DRY (Don't Repeat Yourself) code.
|
||||
|
||||
Sass has two different syntax options to choose from. SCSS, which has the same syntax as CSS but with the added features of Sass. Or Sass (the original syntax), which uses indentation rather than curly braces and semicolons.
|
||||
This tutorial is written using SCSS.
|
||||
|
||||
If you're already familiar with CSS3, you'll be able to pick up Sass relatively quickly. It does not provide any new styling options but rather the tools to write your CSS more efficiently and make maintenance much easier.
|
||||
If you're already familiar with CSS3, you'll be able to pick up Sass relatively quickly. It does not provide any new styling properties but rather the tools to write your CSS more efficiently and make maintenance much easier.
|
||||
|
||||
```scss
|
||||
|
||||
@ -110,7 +111,7 @@ div {
|
||||
@include size(40px, 40px);
|
||||
}
|
||||
|
||||
/* This compiles to: */
|
||||
/* Compiles to: */
|
||||
.rectangle {
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
@ -216,7 +217,7 @@ $main-content: calculate-percentage(600px, 960px);
|
||||
}
|
||||
|
||||
/* Extending a CSS statement is preferable to creating a mixin
|
||||
because of the way it groups together the classes that all share
|
||||
because of the way Sass groups together the classes that all share
|
||||
the same base styling. If this was done with a mixin, the width,
|
||||
height, and border would be duplicated for each statement that
|
||||
called the mixin. While it won't affect your workflow, it will
|
||||
@ -418,11 +419,8 @@ body {
|
||||
width: 6.25%;
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## SASS or Sass?
|
||||
Have you ever wondered whether Sass is an acronym or not? You probably haven't, but I'll tell you anyway. The name of the language is a word, "Sass", and not an acronym.
|
||||
Because people were constantly writing it as "SASS", the creator of the language jokingly called it "Syntactically Awesome StyleSheets".
|
||||
@ -434,7 +432,6 @@ You can use either syntax, just go into the settings and select either Sass or S
|
||||
|
||||
|
||||
## Compatibility
|
||||
|
||||
Sass can be used in any project as long as you have a program to compile it
|
||||
into CSS. You'll want to verify that the CSS you're using is compatible
|
||||
with your target browsers.
|
||||
|
Loading…
Reference in New Issue
Block a user