PDA

View Full Version : [FIXED] Ext JS 4 Themes - hardcoded variable colors



loiane
22 Jul 2011, 5:04 PM
Hi folks,

I was playing with Ext 4 theming and I found a few variables with hardcoded colors. It would be nice and easier to customize if these variables were set with color manipulation instead of hardcoded colors.

Following are some variables:
$grid-header-over-border-color
$accordion-header-background-color
$toolbar-separator-color
$btn-group-background-color
$btn-group-border-color
$btn-group-inner-border-color
$btn-group-header-color
$btn-group-header-background-color
$menu-item-active-background-color
$menu-item-active-border-color

stevil
25 Jul 2011, 8:01 AM
If the variables already exist, you can override them in your theme with whatever color manipulation you like. If they don't exist, and the values are hardcoded into the rules themselves, then I definitely think they should be added.

stevil

edspencer
25 Jul 2011, 11:02 AM
Agreed, I've added this as a task for 4.1

ZaAaV
8 Sep 2011, 7:45 PM
Hey Ed, not sure if that helps but on line 4 of _layout.scss I put:

$accordion-header-background-color: adjust-color($base-color, $hue: 0deg, $saturation: 0.542%, $lightness: 7.843%) !default;


to get the right color...

Haven't tackled the other hard-coded value yet...

Quick question, do you use any tool to figure out the hue, saturation and lightness colors?

Thanks a lot :)

X

edspencer
9 Sep 2011, 11:42 AM
@ZaAav I believe so (I didn't get involved in the theming side of things). I think the numbers there are to match the 3.x theme

Phil Guerrant
4 Apr 2013, 3:55 PM
The neptune theme refactor created variables for just about everything that used to be hardcoded. Please create a new thread if you find anything that you think should be configurable using a variable that is not already so.

Thanks!

Phil Guerrant
4 Apr 2013, 3:59 PM
The neptune theme refactor

In Ext JS 4.2.0 - docs here: http://docs.sencha.com/ext-js/4-2/