Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Sass comments weird.

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #44064
    twincy
    Participant

    can’t get /* */-comments (do we say ‘normal css comments’?) to compile into comments on the same line as a property.

    example:

    .foo
    color: #369
    font-size: 2em /* i like ems */
    padding: 20px

    …should compile into:

    .foo {
    color: #336699;
    font-size: 2em; /* i like ems */
    padding: 20px; }

    no?

    feels like they work in the same way as silent comments (//)

    thoughts anyone?

    #131555
    Senff
    Participant

    Not sure if it’s typos or anything (or if your compiler allows this) but your pre-compiled code doesn’t have brackets and semicolons.

    I use Compass.app as my SASS compiler and if I use this code:

    .foo {
    color: #369;
    font-size: 2em; /* i like ems */
    padding: 20px;
    }

    …it compiles into:

    .foo {
    color: #369;
    font-size: 2em;
    /* i like ems */
    padding: 20px;
    }

    #131567
    Alen
    Participant

    Try placing `!` mark, like so: `/*! comment */`.

    I never leave comments in production code, but I never had issues with SASS compiler on Linux when I just compile it with
    `sass –watch app.scss:app.css`
    and adding
    `–style compressed`
    would make the code production ready, which strips out the comments.

    #133453
    twincy
    Participant

    tnx for answers, ppl!

    i’m using [Guard](http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDEQFjAA&url=http%3A%2F%2Fnet.tutsplus.com%2Ftutorials%2Ftools-and-tips%2Fguard-is-your-best-friend%2F&ei=7JN9UZTuM8aK7Abd94GQAQ&usg=AFQjCNEI_bffAvmJhaGH3D608G25CwNyTg&sig2=WBAmm7ytuFex8OBHqioqdw&bvm=bv.45645796,d.ZGU) on win7.
    i’ll minify the css for production for sure, but at the moment it is set to **:style => :expanded** in my Guardfile.

    i’m using the SASS syntax (without the brackets/semicolons.)
    only if i use the SCSS syntax i can get the comment to (at least) pop down under + then i don’t need to use the bang (!) in the comment.

    #133472
    Subash
    Member

    Works with scss syntax but not with sass.

    You can also download [Prepros App](http://alphapixels.com/prepros) for windows which does compiling and live browser refresh.

    #133558
    twincy
    Participant

    sweet. never heard of it.
    will check. cheers!
    the LiveReload beta was dodgy. this might be an alternative, but i’m trying to use the command line as much as possible (though even Guard prevents it ;))

    #133559
    twincy
    Participant

    now… if i only could get that executable it would be nice…

    #133571
    Subash
    Member

    Sorry @twincy, Now you can download. Cheers !

    #134788
    twincy
    Participant

    awesomesauce :)

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.