mojotech / sass2stylus

Kewl
http://sass2stylus.com/
79 stars 18 forks source link

Convert the simple cases of at-root #80

Open kizu opened 10 years ago

kizu commented 10 years ago

Yes, not all of the @at-root cases could be converted to Stylus now, but the most often used ones are easily convertable as Stylus have root reference. So,

.foo {
  width: 10px;
  @at-root {
    .bar {
      height: 10px;
    }
  }
  @at-root .baz {
    padding: 10px;
  }
}

could be converted to

.foo
  width: 10px
  /
    .bar
      height: 10px
  / .baz
    padding: 10px

When there is a without or with yes, it couldn't be easily transformed to Stylus, but I saw the simple at-root used more often than the one with queries, so it would make sense to support at least it.

samccone commented 10 years ago

:+1: :+1:

@kizu are you just testing random things in the converter? :)

kizu commented 10 years ago

Half that, half — looking at different popular pens on CodePen and see if they could be transformed to Stylus :)

samccone commented 10 years ago

Cool! well thanks!