What is SASS technology?

Asked

Viewed 631 times

12

Nowadays dynamism in producing styles for a page or set of pages is essential for the developer.
And CSS sometimes becomes somewhat complex with complicated, repetitive, and math-heavy selectors.

A technology able to circumvent this difficulty would be in building the style of HTML pages would be a vital tool. I would like an explanation about SASS because the other day a friend of mine said the teacher had programmed CSS?
And I wondered if such a feat would be possible?

  • What exactly does SASS?
  • He is a preprocessor?
  • In which language SASS is compiled?
  • What is needed to use it in the production of styles?
  • What I call him on an HTML page?
  • Could be some example?
  • 6
  • 1

    @gustavox, thanks for the attention man! It wouldn’t be a duplicate because I don’t even know the SASS and much less SCSS!!

  • 2

    So, I just thought I thought I’d figured it out, after I saw the subprons... bad. In the background tbm would like an answer on this standard Sopt :) but I prophesy the following (hoping for that not kkk): Pendant: broad. : -) In time: +1

1 answer

12


The SASS, as you said yourself, is a preprocessor. The idea of using SASS is to extend the CSS with some features that make the task of writing style sheets easier. Some of these features are nesting, mixins and variables.

The most important part of SASS is that it does not exist as a replacement for CSS. This way, you will never include a SASS code file on your pages. The idea of SASS is another: it gives you a syntax in which you write your style sheets with additional features. After that, a preprocessor does the job of "translating" all this into conventional CSS that can finally be included in your HTML pages.

With this, you can think of SASS as a facilitator. Its features are actually more streamlined and organized means of doing usual CSS things. So when you ask what language it’s compiled in, I think the right thing to do would be to say that it’s processed and becomes usual CSS.

To use it in style production, all you need to do is learn the features of SASS, encode your style sheets using these features, and then use the preprocessor to translate this into common CSS. Note that in this task there are several facilitators. For example, if you know Grunt or Gulp, there are ways to automate the task of passing your SASS style sheets through the preprocessor.

To clarify, I believe that in a simplified way the workflow when using SASS can be summarized as follows:

  1. The stylesheet is written using all the SASS features you find necessary. These style sheets will be in . Sass or . scss, depending on the syntax (SASS has two syntax, for more information see that question).

  2. The SASS preprocessor is used to convert the . Sass or . scss style sheets into standard . css style sheets. An example of how to do this would be by installing the Sass command line tool and using the command sass input.scss output.css converting input.scss for output.css.

  3. Included are converted style sheets, i.e., in . css format on your HTML page.

This is just an overview of the subject. The most recommended is to access the site of the SASS and read in more detail. On the page "Learn SASS" has enough functionalities explained and on the page "Install" has the necessary instructions to install SASS and start using it.

  • I leave my +1, cleared my doubts about what is SaSS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.