spree_fancy icon indicating copy to clipboard operation
spree_fancy copied to clipboard

Scss variable naming conventions

Open JEphron opened this issue 11 years ago • 3 comments

I guess this is a minor cosmetic issue, but I thought it'd be worth bringing up nonetheless. I noticed that the scss variables are named by color. For example

$c_red:         #e45353

I've overridden them in my project, and now I've got a variable named $c_red that's actually blue. Would it not be better to name them by purpose?

JEphron avatar Mar 23 '14 17:03 JEphron

The comment immediately after that variable definition explains the purpose:

$c_red:         #e45353 !default;  /* Error red      */

As far as I can see, this colour is used for any error dialogs... and imo red is the perfect colour to use for errors, since everywhere else uses it.

Why do you have a red that is blue?

radar avatar Mar 23 '14 20:03 radar

If the sole purpose of that variable is to determine the color of error dialogs, then perhaps it should be named $c_error

There are also $c_blue and $c_orange variables which don't seem to have any specific meaning attached to them.

If this theme is to be easily customizable then the variable names should be flexible enough to avoid confusion.

JEphron avatar Mar 24 '14 00:03 JEphron

@JEphron Could you please submit a PR to give the variables better names?

radar avatar Apr 03 '14 23:04 radar