What about an easier styling/theming system?

Just an update on this - the SCSS still needs some work, but I made progress this weekend. I simplified everything down to less than a dozen colors, and I took a first pass on making sure that all the colors application-wide are defined by variables.

The part that still needs work is my variable naming conventions. Right now I attempted to over-simplify things.

So I defined variables like:

$primary: #333; //black

then I took those variables and put them into modifyers

$primary_light: lighten($primary, 50%) //gray
$primary_medium: lighten($primary, 35%) //dark gray

and then used those to define colors through other variables:

$topic-list-border-color: $primary_light

The basic idea was that you could replace $primary and then it’d cascade down and replace $primary_light and $primary_medium and further cascade down to redefine the specific element variables like $topic-list-border-color.

It somewhat made sense logically when i set out to reorganize everything, but in practice it’s not really effective to be so broad on the color replacement. If I changed to $primary: #FF0000 for example, you just get a bunch of wonky shades of red because red is too fundamentally different from #333 to just replace it from the foundation - you just can’t modify it with lighten and darken the same way you would with #333 and get a desirable outcome (duh, logic failure on my end).

So instead, I’m going to just have two levels of variables:

$red: #FF0000

and then I’ll plug those in to element specific variables like

$base-link-color: $red

and then the template files will simply be color: $base-link-color

So ultimately on our backend editor I’m envisioning you’d be redefining variables like $base-link-color. Nice and simple.

8개의 좋아요