1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    8
    Vote Rating
    0
    sclement is on a distinguished road

      0  

    Default General Ext explanations wanted

    General Ext explanations wanted


    I have been using Ext 2.0 for some short time now and I have been impressed overall. I do have a couple questions, however, for which I can't seem to find explanations.

    First, why the need for Ext.BLANK_IMAGE_URL = '../some/localpath/to/s.gif'? If I don't specify this, the default implementation looks on the web for this image. Why is this image special and treated differently than all others? One tutorial I saw made mention of this only to say you want to make sure you set the local path because of course you wouldn't want to make a call to extjs.com. I agree, of course I wouldn't. I just don't understand the reasoning behind setting things up this way in the first place.

    Second, the ext-all.css includes
    Code:
    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{border:0;}
    address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
    ol,ul{list-style:none;}
    caption,th{text-align:left;}
    h1,h2,h3,h4,h5,h6{font-size:100%;}
    q:before,q:after{content:'';}
    What was behind the decision to make these styles apply directly to html tags rather than specific ext classes? I was bitten by this one and had to do some additional coding in order to have bulleted lists appear correctly on a page which also included some ext widgets.

    I am guessing that there are some good reasons for these things, but I would love to have some background to help me understand.
    -->

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,080
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    sclement -

    A working path to a blank image is required for many of the css classes to function. Otherwise you will get a broken image in your Ext app. Many people re-arrange the directory structure when they download Ext and therefore their application would break. It points to a blank image on extjs.com so that an image is available in most cases and the app functions as expected. There are many threads on the forums about this.

    The CSS which you pasted stems from YUI reset. The idea is to reset all of the CSS browser inconsistencies and to apply your css explicitly so that you get something that works cross-browser. Do a quick google for yui reset and also check out these links:
    http://developer.yahoo.com/yui/reset/
    http://ajaxian.com/archives/yui-reset-the-browsers-css
    Aaron Conran
    @aconran
    Sencha Architect Development Team
    -->

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Both of the questions have been asked answered repeatedly.

    See the FAQ for s.gif or search the forums - there are also several threads. Here's the most recent.
    Also searching for reset+css will return several threads discussing the CSS questions.

    Closing this thread - further discussion can go to the existing threads.
    -->

Thread Participants: 2