- From: Shane Stephens <shans@google.com>
- Date: Wed, 23 Mar 2011 10:38:41 +1100
- To: Sylvain Galineau <sylvaing@microsoft.com>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Alan Gresley <alan@css-class.com>, www-style list <www-style@w3.org>, Nathan Weizenbaum <nweiz@google.com>, Chris Eppstein <chris@eppsteins.net>
- Message-ID: <AANLkTikGY2+gBL_LHapCM494G55w3gy4xVuyR2Apt=B5@mail.gmail.com>
Hi list, I tested the following 3 patterns for using @mixin declarations with fallback in a number of browsers: .finalPosition { background: green; color: white; @mixin includeMe(foo, bar); } This style rule tests whether a mixin declaration at the end of a block affects the rest of the properties in that block. .nonFinalPosition { background: green; @mixin includeMe(foo, bar); color: white; } This style rule tests whether a mixin declaration in the middle of a block affects the rest of the properties in that block. .artificialFinalPosition { background: green; @mixin includeMe(foo, bar); } .artificialFinalPosition { color: white; } This style rule tests whether a mixin declaration at the end of a block affects properties declared in subsequent blocks. I'm happy to report that on every browser I could get my hands on, all three classes result in a green background with white text when applied to a div. I tested the following browsers: * Internet Explorer 6 * Internet Explorer 7 * Internet Explorer 8 * Internet Explorer 9 beta * Safari 3 * Safari 5 * Firefox 2 * Firefox 3 * Firefox 3.6 * Firefox 4 * Chrome 9 * Chrome 10 * Opera 11 I think it's clear that using an @-rule in this manner is safe on pretty much every browser likely to be currently in use, or at least the vast majority. Cheers, -Shane On Wed, Mar 23, 2011 at 8:34 AM, Sylvain Galineau <sylvaing@microsoft.com>wrote: > [Tab Atkins:] > > On Tue, Mar 22, 2011 at 1:41 PM, Sylvain Galineau < > sylvaing@microsoft.com> > > wrote: > > > [Tab Atkins:] > > >> On Tue, Mar 22, 2011 at 12:46 PM, Alan Gresley <alan@css-class.com> > > wrote: > > >> > I will go into detail of parsing in a follow up email. > > >> > > >> No offense, but please don't, unless it's relevant to the Mixins > > proposal. > > >> If you must detail parsing irregularities, please do so in the form > > >> of bugs against the relevant browsers instead. > > > > > > No offense, but as long as they're related to the syntax you've > > > proposed I think this is perfectly relevant. If someone is kind enough > > > to take the time to explain the impact of any new syntax on existing > > > browsers, they should be most welcome to do so. Compatibility with the > > > ideas in your head, on your blog and in some WebKit patch are > secondary. > > > > That's precisely why I said "unless it's relevant to the Mixins > proposal". > > ^_^ If it's unrelated parsing bugs, like Opera 11 incorrectly parsing > > character escapes in some situations, that should be reported directly to > > Opera and/or be brought up in a separate thread; in this thread it would > > simply be clutter, and be harder to search for later than if it had its > > own, appropriately titled, thread. > > Right, my bad. I saw feedback being shut down before it was produced and > ran for the gun. (Must. Relax.) This being said, Mr Gresley doesn't exactly > have a record of bringing random feedback to this mailing list so if he > thinks browser parsing issues are worth sharing here I'm inclined to hear > him out. > > Whether those issues belong to Mixins or deserve their own thread is now > his > call... > > > > >
Received on Tuesday, 22 March 2011 23:39:11 UTC