PDA

View Full Version : Ext 4 and doctype



7twenty
1 Mar 2011, 1:36 PM
In the past, I have heard that Sencha recommends no doctype. With Ext JS 3, I've run into layout issues with Ext components when I've used a strict doctype.

However, I notice that the Ext 4 Examples use different doctypes:
- Strict: http://dev.sencha.com/deploy/ext-4.0-pr2/examples/layout/border.html
- Transitional: http://dev.sencha.com/deploy/ext-4.0-pr2/examples/charts/Area.html
- None: view-source:http://dev.sencha.com/deploy/ext-4.0-pr2/examples/draw/Tiger.html

Most Ext 4 examples do seem to use either strict or transitional.

What is the recommended doctype for Ext 4?

TommyMaintz
1 Mar 2011, 5:26 PM
For Ext 4 and going forward we recommend using a Strict doctype for your apps.

Our visual QA is running all the examples in all the different browser modes however, and we are trying to ensure the framework will work no matter what doctype you use.

Jamie Avins
2 Mar 2011, 11:39 AM
The recommended doctype is to use strict mode as browsers optimize for this and Ext4 uses CSS box-sizing (IE6 and IE7 excluded) instead of javascript to ensure consistent measurements.

7twenty
4 Mar 2011, 2:02 PM
Thanks for the replies. That is great news that we can use strict doctype.

mangotang
13 May 2011, 7:02 AM
The html 5 spec recommends this doc type:
<!DOCTYPE html>
http://dev.w3.org/html5/spec/Overview.html#the-doctype

I believe the ExtJs 4 is Html 5 compatible. So would you recommend using the html 5 doctype?

charris
15 Jun 2011, 9:30 AM
The recommended doctype is to use strict mode as browsers optimize for this and Ext4 uses CSS box-sizing (IE6 and IE7 excluded) instead of javascript to ensure consistent measurements.

Pardon my dense skull, but to be explicit: you're saying that Ext4 still supports consistent box-sizing in IE6/7, but it does so via JavaScript. Correct? Thanks.