A
A
Anton Misyagin2015-06-03 12:49:12
Ruby on Rails
Anton Misyagin, 2015-06-03 12:49:12

Customizing Sass Syntax in Rails?

I found only this syntax setting:

preferred_syntax - This option determines the default Sass syntax and file extensions that will be used by Rails generators. Can be :scss (default CSS-compatible SCSS syntax) or :sass (indented Sass syntax).

I want to use :sass. But with a twist. I read articles, I see such examples www.internet-technologies.ru/articles/article_1874.html :
$color: #fff
header
   margin: 0
   padding: 0
   color: $color

But I don't, but like this:
$color: #fff
header
   :margin 0
   :padding 0
   :color $color

How to use option 1? It’s more convenient for me when you insert a ready-made piece of css into your sass in one movement, I get rid of brackets and semicolons, but I have to tinker with a colon ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2015-06-03
@sunnmas

How to use the first option? Take it and use it, just don't forget about the .sass extension.
Here is another handy service for quick conversion from CSS:
css2sass.heroku.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question