On Fri, Sep 19, 2014 at 1:33 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Fri, Sep 19, 2014 at 9:49 AM, Shawn Ligocki <sligocki@google.com> > wrote: > > I'm looking into adding @font-face parsing to our CSS parser and I'm > trying > > to figure out how to represent them. It would make it much simpler if all > > the @font-face rules could be stored in a separate list from the > rulesets. > > But this would only be safe if the relative order doesn't matter between > > @font-face rules and rulesets. Otherwise, we'd need to preserve the > original > > ordering. > > > > For example, are the following equivalent: > > > > @font-face { ...1 } > > .a { ...2 } > > @font-face { ...3 } > > .b { ...4 } > > > > and > > > > @font-face { ...1 } > > @font-face { ...3 } > > .a { ...2 } > > .b { ...4 } > > > > no matter what the ...s contain? Or could the .a being between the two > > @font-faces cause the interpretation to differ? (Say only respect the > font > > from the first @font-face rule and not the second??) > > Relative ordering of @font-face and normal rules makes no difference > to the use of those font faces; CSS is a properly declarative > language, and doesn't have that sort of ordering dependence between > resources and links. > > Since you don't care about preserving the overall stylesheet order, > feel free to reorganize the @font-face rules, or stash them in a > separate stylesheet. > Thanks Tab, this simplifies things a lot. (And sorry about the double post, looks like moderation just posted my original message)Received on Wednesday, 24 September 2014 14:40:38 UTC
This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC