Give help. Get help.

  • # July 15, 2013 at 6:04 am


    i am in the process of creatinga responsive grid with scss and I was naming my variables like so

    $1col: 6.25%;
    $2col: 12.5%;
    etc etc

    I was getting scss compilation errors saying ‘

    > > Syntax error: Invalid CSS after “$”: expected identifier, was “1col: 6.25%” on line 75 of C:………….

    So guessing the identifier they were talking about was a css identifier I renamed the variables to

    $width1col: 6.25%;
    $width2col: 12.5%;
    etc etc

    and the compilation succeeded, does there really have to be a css identifier name in ever variable I create in scss? why does the name matter? I have seen variable names called simply $blue that work, why do these work and not other descriptive names that dont include identifiers?

    I feel like I am missing something obvious, what is it?

    # July 15, 2013 at 6:35 am

    Classes and IDs cannot start with numbers so I would guess that the same is true of variables.

    # July 15, 2013 at 7:09 am

    You are dead right thanks

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.