I've been asked to demo some ExtJS UI enhancements to our current apps inside Salesforce. This is just a proof of concept that ExtJS will work as a good UI replacement for the default UI that most of our VisualForce pages use.
Everything works great, that is, except a few odds and ends of the CSS. There are lots of styles inside "...visual.force.com/sCSS/21.0/sprites/13013.../Theme3/default" that are messing with the ExtJS elements. Specifically commmon.css and extended.css. Here's an example:
Extended.css
body .x-date-middle, .x-date-left, .x-date-right {
background: none repeat scroll 0 0 transparent;
}
Is there an elegant way around this, or is ExtJS just not going to play well inside of Salesforce?
For example: Is there a way that I can tell my VisualForce page to ignore commmon.css and extended.css?
Do you need the standard Salesforce style sheets? If not, you can use the showHeader and standardStylesheets attributes to stop Salesforce from sending down the style sheets.
<apex:page standardStylesheets="false" showHeader="false">
</apex:page>
I can't speak to whatever Salesforce is doing, but if Ext's styles are being overridden (by any other CSS really) you have two choices: remove the offending CSS, or override the rules yourself. Not much way around that in Ext 3.x.
In Ext 4 you'll be able to sandbox your Ext styles by customizing the global Ext.baseCSSPrefix
config, which will effectively eliminate this issue going forward.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With