W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

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

From: Jinfeng Ma via GitHub <sysbot+gh@w3.org>
Date: Mon, 08 Jun 2020 09:42:59 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-634454918-1591609378-sysbot+gh@w3.org>
mjf-g has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ui-3] Can CSS resize change the value of the width/height properties which has been set with !Important? ==
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.
```html
#div {
  width: 200px !important;
  height: 200px !important;
  overflow: hidden;
  resize: both;
}
```


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5184 using your GitHub account
Received on Monday, 8 June 2020 09:43:01 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:27 UTC