As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 652014 - Add diagnostic for nested at-rules so we give an error when @-moz-keyframes is inside @media
: Add diagnostic for nested at-rules so we give an error when @-moz-keyframes i...
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: mozilla6
Assigned To: David Baron :dbaron: ⌚️UTC-8
: Jet Villegas (:jet)
: 669839 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-04-21 16:37 PDT by Divya Manian
Modified: 2011-07-07 09:26 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

add diagnostic (2.16 KB, patch)
2011-04-21 17:43 PDT, David Baron :dbaron: ⌚️UTC-8
bzbarsky: review+
Details | Diff | Splinter Review

Description User image Divya Manian 2011-04-21 16:37:56 PDT
User-Agent:       Opera/9.80 (Macintosh; Intel Mac OS X 10.6.6; U; en) Presto/2.8.131 Version/11.50
Build Identifier: 5.0a2

When CSS animations are used outside of media queries they work, but fail when used within a media query

Reproducible: Always

Steps to Reproduce:
1. Click on the link
2. The loader should rotate like
3. Loader fails to rotate
Actual Results:  
No animation

Expected Results:  
The CSS animations get applied.
Comment 1 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-21 17:18:34 PDT
CSS syntax does not allow nesting @-rules.  So the @-moz-keyframes rule inside @media is ignored.

We should probably report an error to the error console in this situation instead of silently skipping the rule...
Comment 2 User image David Baron :dbaron: ⌚️UTC-8 2011-04-21 17:30:32 PDT
I think I have a patch for the diagnostic, but the testcase seems to have been modified...
Comment 3 User image David Baron :dbaron: ⌚️UTC-8 2011-04-21 17:31:48 PDT
Oh, wait, the link in comment 0 is different from the one in the URL field.
Comment 4 User image David Baron :dbaron: ⌚️UTC-8 2011-04-21 17:43:05 PDT
Created attachment 527699 [details] [diff] [review]
add diagnostic
Comment 5 User image Tab Atkins Jr. 2011-04-21 17:44:17 PDT
Boris, that doesn't seem right.  According to
<>, an @-rule can contain more @-rules:

The 'at-rule' construction produces a 'block'.
The 'block' construction can produce the at-rule construction (indirectly).

And section 4.1.5 doesn't appear to give any more specific contraindications.
Comment 6 User image David Baron :dbaron: ⌚️UTC-8 2011-04-21 17:46:44 PDT is very clear that @media rules contain only ruleset. also says explicitly:
  # At-rules inside @media are invalid in CSS2.1.
Comment 7 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-21 18:08:52 PDT
Ah, indeed.  The basic CSS2.1 grammar does not disallow nesting @-rules in theory, but it does disallow actually putting @-rules inside any @-rules CSS2.1 defines (that just being @media).
Comment 8 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-21 18:09:34 PDT
Comment on attachment 527699 [details] [diff] [review]
add diagnostic

Comment 9 User image David Baron :dbaron: ⌚️UTC-8 2011-04-21 20:26:17 PDT
Comment 10 User image arno renevier 2011-07-07 09:26:46 PDT
*** Bug 669839 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.