- Notifications
You must be signed in to change notification settings - Fork 759
Description
https://drafts.csswg.org/css-overflow-3/#overflow-propagation
UAs must apply the
overflow-*values set on the root element to the viewport when the root element’sdisplayvalue is notnone. However, when the root element is an [HTML]<html>element (including XML syntax for HTML) whoseoverflowvalue isvisible(in both axes), and that element has as a child a<body>element whosedisplayvalue is also notnone, user agents must instead apply theoverflow-*values of the first such child element to the viewport.
<!DOCTYPE html> <html style="border: solid; height: 200vh; margin: 1em"> <body style="display: contents; overflow: hidden">Blink, WebKit and Gecko agree: the viewport has scrollbars despite the body having overflow: hidden.
Note this isn't a problem on the root, since there display: contents computes to block (https://drafts.csswg.org/css-display-4/#root).