PDA

View Full Version : Reading CSS values with Ext.util.CSS.getRule



philiparad
3 Mar 2011, 5:31 AM
Let say we have two separate CSS files, one after the other, like this:
<link rel="stylesheet" type="text/css" href="custom1.css"/>
<link rel="stylesheet" type="text/css" href="custom2.css"/>

First file with:
Code:


.ppp{
position:absolute;
left:8px;
top:80px;
width:310px;
height:372px;
}

and second file with:
Code:


.ppp{
position:absolute;
left:8px;
top:80px;
}


then Ext.util.CSS.getRule('.ppp').style.width or Ext.util.CSS.getRule('.ppp').style.getPropertyValue('width')
return no value.
The function fails to go up to the first CSS to read the value.
(I do not want to repeat the values in the second file)

Regards
Philip Arad - Web Architect at Solaredge