PDA

View Full Version : CSS supposed to affect non-ExtJS UI?



etalcott
24 Jun 2009, 7:16 AM
I thought I had read something in the 3.0 expected features that said the CSS would be changed to not affect anything except ExtJS portions of our applications. Did I misread that or did something change? The CSS is clearly still not all ExtJS-specific (example from ext-all.css):
html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{borde
r:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-a
lign:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}

If I misread it, is there any plan to change this in the future so that the CSS only affects ExtJS pieces of our applications? If not, what is the suggested approach for resolving this so that my legacy application is still formatted correctly, but ExtJS UI pieces are formatted as intended?

jay@moduscreate.com
24 Jun 2009, 7:56 AM
The problem with Cross browser compatability with any UI framework is that there needs to be a "Reset" of the CSS, which levels the playingfield so to speak.

This way you have the freedom to style things as you wish.

jay@moduscreate.com
24 Jun 2009, 7:57 AM
http://developer.yahoo.com/yui/reset/

etalcott
24 Jun 2009, 8:03 AM
I get the idea of the CSS reset, but couldn't the reset be done to to some generic ExtJS UI wrapper instead of globally?

aconran
24 Jun 2009, 5:55 PM
etalcott -

Panels now support the ability to have markup inside of them which is completely isolated from the reset.css and still looks consistent cross-browser.

To turn on this configuration pass preventBodyReset: true.

Isolating all of the components so that they did not affect any existing CSS would have been a very challenging task so we took the approach of providing the most common use case. (Placing plain old markup in Panel's and Window's)

etalcott
25 Jun 2009, 8:07 AM
Thanks for your reply. I'm not sure this helps me at all but I will take a look.