CSS 2 Sass: How do I change the output format of the generated SCSS?


Tags: css,ruby,sass

Problem :

I want to convert CSS to SCSS that looks like this:

.top {
  margin-top: 1em;
  margin-bottom: 1em;
  nav {
    background: #333;
  }
  ul {
    padding: 0;
    display: table-row;
  }
  li {
    display: table-cell;
  }
}

Instead, I am getting this:

.top {
  margin-top: 1em;
  margin-bottom: 1em;
  nav {
    background: #333; }
  ul {
    padding: 0;
    display: table-row; }
  li {
    display: table-cell; } }

How do I change the output indentation in the command:

sass-convert public/stylesheets/application.css public/stylesheets/application.scss

Thanks!



Solution :

According to the docs (and checking 'sass-convert -h' on the command line) there is no way to change the output style when going from css to scss (or sass).


    CSS Howto..

    How to restrict zoom of webpage to stretch when iPhone and Android in landscape orientation?

    how to change CSS on the youtube subscribe widget

    How should a graphic designer learn web design? [closed]

    How to dynamically create two rows of squares in html/css/javascript

    How to set fixed base to calculate vh unit in css on mobile?

    How to highlight a currently selected item/section in Wordpress with CSS (maybe PHP too)?

    How to alter CSS properties using PHP based on a conditional

    How to squash a div vertically and keep element below 100% on screen

    How to override font-size (em) in this condition?

    How to apply CSS using User Scripts

    How to Change background-color of .body when hover menu ( Jquery - Shopify )?

    How to add padding to a ul/li menu with a background image?

    Javascript: Hover over Issues & How can I structure the html efficiently?

    How to toggle class using jquery if else statement?

    How to make content appear under absolute position

    How to center this stuff inside a link using CSS?

    How should I create a web interface for my application? [closed]

    How change css of disabled input checkbox tag?..because it's too light and hard to see

    How to include all css kept in a direcotry?

    links are showing up on each line, instead of inline

    How to prevent input elements from affecting a table's columns' widths?

    How can I show hidden element when it has focus?

    simplecart.js Images not Showing in IE8 on blogger.com site

    How to float 3 divs with margin left & right 0px?

    How to get jQuery UI tabs element panels and set visibility on some of them?

    How can I allow resizable() to increase size beyond initial size?

    How can I edit adjacent selector to a nested one

    How to put inline circles made in CSS under each other when screen scales?

    How to select part of a custom element with CSS?

    How can I drag an element into a dropdown list using jQuery UI sortable()?