CSS: order of at-rules

With the introduction of the CSS3 @namespace rule most web developers get confused by the order in which the at-rules must appear. First of all, there are three types of at-rules that must be put at the very beginning of a style sheet: @charset, @import and @namespace. Before the adoption of the @namespace rule, the order was the following:

  1. @charset
  2. @import

Now the order has been changed, because the @namespace rule is at the bottom of the list:

  1. @charset
  2. @import
  3. @namespace

As you can see, the order reflects the new status of CSS at-rules.

This entry was posted in by Gabriele Romanato. Bookmark the permalink.

Leave a Reply

Note: Only a member of this blog may post a comment.