maximkoretskiy / postcss-initial

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

Display rule should be set to block #13

Closed DmitryOlkhovoi closed 8 years ago

DmitryOlkhovoi commented 8 years ago

Display rule should be set to block. HTML Block elements have by default display: block; and when plugin sets inline value, is breaks width and height of an element. User will should to set inline value to inline elements

https://jsbin.com/kajovup/edit

maximkoretskiy commented 8 years ago

Hi. It looks like everything works as it was expected. Your example in jsbin demonstrates than all: initial resets display to 'inline' for all types of elements.

Demo: https://jsbin.com/ketaxurugi/1/edit?html,js,output

maximkoretskiy commented 8 years ago

@DmitryAuine can we close this issue?

DmitryOlkhovoi commented 8 years ago

Yes) Maybe i will write a custom plugin for that. When i reset rules i expect the block elements will be with display: block :)

maximkoretskiy commented 8 years ago

Good luck! To avoid any misunderstandings, I should say that it's not a good idea to break default behaviour that was described in the spec. But we can set a custom reset that doesn't affect on display rule.

DmitryOlkhovoi commented 8 years ago

Yes i understand, it's not a good idea to break default behaviour, but it will very useful)

giuseppeg commented 8 years ago

Hi, I was about to open a similar issue. @maximkoretskiy maybe we should mention that resetting to inline is what the spec says.

@DmitryAuine did you find a workaround this? Maybe it is better to set reset to inherited and reset the others by hand or with postcss-autoreset ?