Re: [css-cascade] unwinding all: property

On Tue, Feb 17, 2015 at 4:55 PM, Marat Tanalin <mtanalin@yandex.ru> wrote:

> 17.02.2015, 21:40, "Brian Kardell" <bkardell@gmail.com>:
>
> For example, the `all: initial` or `all: unset` may be quite useful for
> external non-(i)framed widgets to prevent them from inheriting site's own
> styles that the widgets have nothing to do with. Or to style site's own
> blocks independently from each other on the page and regardless of where
> are they to be placed into.
>
> "Reset" stylesheets can also become unneeded as a class.
>
> It should also be noted that quality websites typically use almost no
> default user-agent styles other than, well, `font-weight: bold` for
> `STRONG` and `B` elements, and `font-style: italic` for `EM` and `I`
> elements.
>

Perhaps I'm dense and totally missing it, but that's exactly what I'm
saying doesn't seem to be the case.  Specificity rules in CSS, so resetting
a container is going to do pretty much jack, you've basically got to reset
all children.  If your widget contains a script or link tag, they are going
to get the initial value (display inline, not display none which is
provided by the user-agent stylesheet).  If it contains h1-6 or blockquote,
you're going to get the initial value.  If it contains elements, they won't
look like elements and so on. Basically: everything will look like a span.
 see http://codepen.io/bkardell/pen/LEdNbY


-- 
Brian Kardell :: @briankardell :: hitchjs.com

Received on Tuesday, 17 February 2015 23:16:15 UTC