maximkoretskiy / postcss-initial

PostCSS plugin to fallback initial keyword
MIT License
187 stars 11 forks source link

unset is not initial #6

Closed iamvdo closed 9 years ago

iamvdo commented 9 years ago

unset should be treated as inherit for inherited properties, and if it is not, this is treated as initial. http://www.w3.org/TR/css-cascade-3/#inherit-initial

Now plugin does all: initial

ai commented 9 years ago

@maximkoretskiy awesome, at least we can change unset to initial. The question is only with plugin name. postcss-all-property?

ai commented 9 years ago

@iamvdo can you explain different between unset and initial. I miss it again :(

maximkoretskiy commented 9 years ago

@ai @iamvdo unset sets to initial value only uninherited properties. I hope postcss-all-property will be more universal.

iamvdo commented 9 years ago

all: initial reverts all properties to their initial value as defined in spec all: unset reverts all properties to their inherited value (if property inherits) or to their initial value (if property does not inherit)

iamvdo commented 9 years ago

But it's not 100% sure, as listed here: https://github.com/iamvdo/pleeease/issues/10

ai commented 9 years ago

@iamvdo you mean all: unset reverts to default browsers values. So all: unset will have different values in different browsers?

It this case maybe there is no set to support all: unset. I can’t find good user case for it.

iamvdo commented 9 years ago

So all: unset will have different values in different browsers?

No, I've written a blog post in French some times ago with some code sample, maybe you can use Google translate to get a little help: http://iamvdo.me/blog/la-cascade-css-avancee-all-initial-et-unset

iamvdo commented 9 years ago

So all: unset will have different values in different browsers?

I mean, not in different browsers but in different situations, for a bunch of properties, yes.

maximkoretskiy commented 9 years ago

Renamed project and property value. Thinking on implementtation all: unset using inherit keyword for some properties. inherit is supported by all browsers startting from ie8, so fallback will work fine.

maximkoretskiy commented 9 years ago

@ai @iamvdo
implemented new varian of all: unset here

Does it work correctly? fixture