2014-01-23 71 views
2

我在示例和示例中看到了許多不同HTML元素上的類dijitReset,但我無法找到該類用於什麼目的的解釋。這裏是dijit.form文檔中的一個例子(沒有解釋):什麼是dijitReset類?

<span class="dijit dijitReset dijitLeft dijitInline" 
    data-dojo-attach-event="ondijitclick:_onButtonClick,onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse" 
    ><span class="dijitReset dijitRight dijitInline" 
     ><span class="dijitReset dijitInline dijitButtonNode" 
      ><button class="dijitReset dijitStretch dijitButtonContents" 
       data-dojo-attach-point="titleNode,focusNode" 
       name="${name}" type="${type}" value="${value}" role="button" aria-labelledby="${id}_label" 
       ><span class="dijitReset dijitInline" data-dojo-attach-point="iconNode" 
        ><span class="dijitReset dijitToggleButtonIconChar">&#10003;</span 
       ></span 
       ><span class="dijitReset dijitInline dijitButtonText" 
        id="${id}_label" 
        data-dojo-attach-point="containerNode" 
       ></span 
      ></button 
     ></span 
    ></span 
></span> 

回答

3

從Dojo源代碼文件dijit.css:它的目的是恢復保證金特定頁面的樣式

.dijitReset 
{ 
/* Use this style to null out padding, margin, border in your 
     template elements so that page specific styles don't break them. 
- Use in all TABLE, TR and TD tags. 
*/ 

margin:0; 
border:0; 
padding:0; 
line-height:normal; 
font: inherit; 
color: inherit; 
} 

所以,邊界和填充以便它們不會破壞您的Dojo模板對象。