Bug 217378 - CSS's `display: initial;` causes `<div>` to render as `display: inline;`. Should be `display: block;`
Summary: CSS's `display: initial;` causes `<div>` to render as `display: inline;`. Sho...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-06 04:59 PDT by Mike Herchel
Modified: 2020-10-07 22:35 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Herchel 2020-10-06 04:59:31 PDT
When using `display: initial` on a DIV element, it causes the element to render as inline, when it should be rendering as block. 

This also happens when using the `all: initial` reset. (https://developer.mozilla.org/en-US/docs/Web/CSS/all)

https://drafts.csswg.org/css-cascade/#initial-value
Comment 1 Radar WebKit Bug Importer 2020-10-07 22:05:10 PDT
<rdar://problem/70079759>
Comment 2 Antti Koivisto 2020-10-07 22:35:16 PDT
This is the correct behavior and matches all browsers. The initial value of 'display' property is 'inline'.

https://jsbin.com/lojahoj/4/edit?html,output

Use 'revert' if you want to get the user agent stylesheet value.