Re: [csswg-drafts] [css-overflow-3] computed value rules for 'overflow' should not depend on whether something is a replaced element (#7435)

Had a discussion with @dbaron today. The current implementation for how overflow is applied to replaced elements is dependent on the element's tag (for example img and object in this case). This is required for any values being supplied by UA CSS and wasn't the part dbaron was concerned about. @Loirooriol please clarify if you disagree.

The concern was with modifying the style at value computation to apply the overrides in the spec. Implementation wise they follow the same pattern as UA CSS and depend on the element's tag. But this runs into the case where the same tag might not be rendered as a replaced element (like when img falls back to alt test).

Given that we need to rely on the element tag to identify a replaced element in UA CSS, it seems reasonable to rely on the element's tag (which is known at value computation time) when applying overrides to its computed value as well. I see some precedent for this in [code](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/resolver/style_adjuster.cc) but I could only trace back to the spec [here](https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3:~:text=The%20font%20element%20is%20expected%20to%20override%20the%20color%20of%20any%20text%20decoration%20that%20spans%20the%20text%20of%20the%20element%20to%20the%20used%20value%20of%20the%20element%27s%20%27color%27%20property).

@tabatkins for an opinion too.

-- 
GitHub Notification of comment by khushalsagar
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7435#issuecomment-1176562500 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 6 July 2022 18:52:33 UTC