-
30 Dec 2011 1:31 PM #1
Answered: Changing tab height in tabbar using Compass theming
Answered: Changing tab height in tabbar using Compass theming
I successfully used theming with Compass and Ext4.0.7 to change tab height in tabbar using:
at the top of my-theme.scssCode:$tab-height: 40px !default;
This, however, changes the height of tabs globally, in all TabPanels, while I would be able to customize different TabPanels of my app in different way. For Panel or ProgressBar it can be done using @mixin/ui, but there is no ui for TabPanel.
So is it possible at all to change selectively $tab-height only for some TabPanel classes?
P.S.
I would like to do it in scss theme, in a custom-ui-like way, avoiding a hassle of customizing final css like described here.
-
Best Answer Posted by mitchellsimoens
You will need to specify a cls on the tabpanels you want the tabs to be changed and do some SCSS in that cls.
-
31 Dec 2011 7:25 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
You will need to specify a cls on the tabpanels you want the tabs to be changed and do some SCSS in that cls.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
6 Jan 2012 12:37 PM #3
OK, so I did as suggested, used the cls.
For the record, below I put a way that makes tweaking the tabpanel css using cls config a little bit easier.
First, of course set:
in TabPanel config.Code:cls: 'MainPanel'
Then, create a custom theme:
and copy all tab height-related CSS rules to another CSS file.Code:$include-default: false; // customize tab variables: $tab-height: 40px !default; $tabbar-strip-height: 7px !default; @import 'ext4/default/all'; // include only TabPanel-related stuff .MainPanel { @include extjs-tabbar; }; .MainPanel { @include extjs-tab; }; $relative-image-path-for-uis: true; // defaults to "../images/" when true
The point of this procedure is that it will automatically generate all rules by calculating height of all elements just based on $tab-height and putting .MainPanel at front:
Code:.MainPanel .x-border-box .x-tab-bar-top .x-tab-bar-body-default-plain { height: 43px; }


Reply With Quote