-
24 May 2010 11:41 PM #1Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,455
- Vote Rating
- 50
[3.2.1][DEFER] Ext.util.CSS.updateRule won't work if using @media CSS rule
[3.2.1][DEFER] Ext.util.CSS.updateRule won't work if using @media CSS rule
If using a @media rule to mix targeted medias in a css file such as:
Problem: updateRule will not work if an attempt is made to update the .myGrid rule:Code:@media print { .myGrid { font-size:18px; } } .someOtherClass { font-size:12px; }
since cacheStyleSheet assumes a flat structure:
Definitely not a common use case but might still be worth notingCode:cacheStyleSheet : function(ss){ if(!rules){ rules = {}; } try{ var ssRules = ss.cssRules || ss.rules; for(var j = ssRules.length-1; j >= 0; --j){ // when it breaks, ssRules[j] will be a CSSMediaRule object, not a CSSStyleRule and CSSMediaRule doesn't have a selectorText property. rules[ssRules[j].selectorText.toLowerCase()] = ssRules[j]; } }catch(e){} },
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Ext.util.CSS.updateRule does not work in IE
By extbio in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 14 Jul 2009, 12:07 PM -
[2.??] Managing CSS with IE Ext.util.CSS.updateRule()
By Thierry in forum Ext 2.x: BugsReplies: 0Last Post: 23 Jun 2008, 11:15 PM -
Ext.util.CSS.updateRule doesn't work in IE?
By rogerr in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 21 May 2008, 4:57 AM -
Ext.util.CSS.updaterule not working in IE
By zipi in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 17 Jan 2008, 4:12 AM


Reply With Quote