Skip to content

[css-ui-3] Can |CSS resize| change the value of the width/height properties which has been set with !Important? #5184

@mjf-g

Description

@mjf-g

https://drafts.csswg.org/css-ui-3/#resize:

When an element is resized by the user, the user agent sets the width and height properties to px unit length values of the size indicated by the user, in the element’s style attribute DOM, replacing existing property declaration(s), if any, without !important, if any.

Does this mean that we can't resize an element with !important width/height? The end of this sentence may not be easy to understand.

The div element with the following style can't be resized indeed in Firefox and Chrome.

#div {
  width: 200px !important;
  height: 200px !important;
  overflow: hidden;
  resize: both;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions