roole icon indicating copy to clipboard operation
roole copied to clipboard

Fully case-insensitive

Open curvedmark opened this issue 13 years ago • 7 comments

abc is Abc
.button
    display: inline-block

#submit
    @extend .BUTTON

curvedmark avatar Feb 07 '13 10:02 curvedmark

What is the reasoning for having a case insensitive syntax?

jamiebuilds avatar Feb 17 '13 20:02 jamiebuilds

Because CSS itself is case-insensitive:

body {
    margin: 0;
}

is the same as

body {
    MARGIN: 0;
}

curvedmark avatar Feb 18 '13 03:02 curvedmark

Properties are but selectors are not

jamiebuilds avatar Feb 18 '13 04:02 jamiebuilds

that's because the external environment is case-sensitive, not the CSS itself.

curvedmark avatar Feb 18 '13 05:02 curvedmark

But html defines the most heavy use of CSS. I'm not sure if by making the language totally case-insensitive, it would make the developer's life harder. Need more use cases.

curvedmark avatar Feb 18 '13 05:02 curvedmark

By making it case insensitive you are limiting the output and correcting the developer... Never correct the developer, especially when you have nothing to gain by it. If CSS selectors are not case sensitive, then you should not force them to be.

jamiebuilds avatar Feb 18 '13 05:02 jamiebuilds

However, selectors are not totally case-sensitive when it comes to pseudo selectors, e.g., ::before is the same as ::Before, and :not() is the same as :NOT()

curvedmark avatar Feb 23 '13 05:02 curvedmark