Customize css for Grid
I would like to modify the default css for the column header across my entire application and was wondering what the best practice would be:
I am not sure what approach would work the best.
So, two things:
1. The first bit of the CSS class name is generated at compile time by the GWT compiler. It shrinks (and obfuscates) the name of the CSS class. This can be turned off in your gwt.xml file, but probably shouldn't because,
2. You can override and inject your own CSS as such: http://www.sencha.com/forum/showthread.php?250743
Thank you icfantv
You are correct, I do want to obfuscate the css classes. I just have them "pretty" during development.
With regards to the link you gave me. I have several, grids, buttons ... Would I have to overwrite them everywhere? Or would an approach like http://neiliscoding.blogspot.ca/2012/06/gxt-3-theme-guide-setup-customised.html work better?
mtadros, the forum post that icfantv links to is following the same basic approach as the forum post you are linking to - in both cases an appearance is being used. In the blog post, the existing appearances are copied and modified, while in the forum link the existing appearances are extended. It is up to you which strategy you pick.
to expand on colin's response, if you would like to change the appearance of multiple widgets and reuse them in your app, the easiest thing to do would be to extend Grid, TextButton, etc... and inject your own *Appearance. then, instead of Sencha's Grid and TextButton, you would use your new one.