-
29 Oct 2012 11:10 AM #1
[4.1.3] Themes cannot modify menu gradient or border
[4.1.3] Themes cannot modify menu gradient or border
When theming menu components, no SASS variables exist to modify the menu background gradient style or border width and radius. Instead, the values are hard-coded to use a "matte" gradient, a border width of 1px, and a border radius of 3px. From resources/themes/stylesheets/ext4/default/widgets/_menu.scss:
Variables such as $menu-item-active-background-gradient and $menu-item-active-border-radius should be added to allow these values to be changed for individual themes.Code:.#{$prefix}menu-item-active { cursor: pointer; .#{$prefix}menu-item-link { @include background-gradient($menu-item-active-background-color, 'matte'); margin: 0px; border: 1px solid $menu-item-active-border-color; cursor: pointer; @include border-radius(3px); } }
-
29 Oct 2012 12:12 PM #2
usually we won't change that, you can replace it with variable you defined by yourself, can't you? otherwise, the margin is 0px, border style is 'solid' are all hard coded.
-
29 Oct 2012 12:24 PM #3
Sure, it's possible to add additional CSS rules to override these hard-coded values; that's what I'm currently doing to work around this. However, it makes the resulting CSS bigger (since the default values are included along with the overrides, even though they're not used for anything) and requires more work on the part of the person doing the theming. And if I change the values in the ExtJS SASS directly, those changes will all be wiped away the next time I upgrade ExtJS. Isn't the whole point of using SASS so that the theme can be controlled in one place by variables, without hacking together a bunch of overrides?
Also, panels and toolbars and most other widgets already provide variables like this to control their borders and background gradients ($panel-border-radius, $panel-header-background-gradient, $toolbar-inner-border-width, $toolbar-background-gradient, and so on). Why would menu components be any different?
-
29 Oct 2012 12:34 PM #4
Thanks for the report! I have opened a bug in our bug tracker.
You found a bug! We've classified it as
EXTJSIV-7638
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote