- From: Jeffrey Way <jeffrey@envato.com>
- Date: Thu, 5 Jan 2012 19:10:48 -0500
- To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org
- Message-ID: <3B244EF3CE3B41B6BBB6FBA348210049@envato.com>
The problem is that, if introduced, it *really* encourages newcomers to use and abuse it. The potential uses are so rare that it doesn't seem necessary. More bad good potentially come from it than good. I'm in favor of: prop: val !; Jeffrey On Thursday, January 5, 2012 at 7:03 PM, Marat Tanalin | tanalin.com wrote: > 06.01.2012, 03:48, "Tab Atkins Jr." <jackalmage@gmail.com (mailto:jackalmage@gmail.com)>: > > 2012/1/5 Marat Tanalin | tanalin.com <mtanalin@yandex.ru (mailto:mtanalin@yandex.ru)>: > > > > > 06.01.2012, 03:30, "Tab Atkins Jr." <jackalmage@gmail.com (mailto:jackalmage@gmail.com)>: > > > > !important is *almost always* a bad idea in author stylesheets, and I > > > > don't want to support anything making it more convenient. > > > > > > > > > > !important _is_ used in real world anyway. > > > > > > > > > Yes, so I wouldn't advocate removing it entirely (even if I think it > > would probably be a good idea). I'm just saying that I don't want to > > make it *easier* to use !important in author stylesheets. > > > > > Sounds somewhat odd for me. There are cases where it's needed to override previous rules exactly once, thus not resulting in any bad consequences as for specificity. Grouping such rules inside @important rule would improve readability of CSS code in such cases. > > > > > You're right, though, that it's often necessary to put !important on > > > > every single declaration in user stylesheets. Perhaps we can solve > > > > this in an easier way. For example, asking browser vendors to support > > > > two user stylesheets, one of which is processed normally and the other > > > > which is automatically placed in the user!important level (wherein > > > > !important wouldn't do anything). > > > > > > > > This way you can easily distinguish en-masse between setting your own > > > > defaults (the use of the normal user level) and overriding the page's > > > > styles (the use of the user!important level). > > > > > > > > > > Do you mean that we will then be forced to have two separate CSS files? > > > > > > If so, it would be not as usable as @important rule would be since latter would allow to put all user styles in one stylesheet. > > > > Sure, it would be less convenient in some ways. It's also better in > > some ways - it cleanly distinguishes between the two uses that user > > stylesheets are put to. > > > > Importantly, though, it requires zero additions to the CSS language. > > Given that user stylesheets are important but niche, finding solutions > > that don't involve expanding the language is somewhat valuable. > > > > ~TJ > > A probable usable option is to add @important to CSS spec but limit its application to user stylesheets only.
Received on Friday, 6 January 2012 01:51:29 UTC