[csswg-drafts] Compat (not sure what spec) setting `.style.border` to `"none"` sets it to `"medium"` (#13343)

Psychpsyo has just created a new issue for https://github.com/w3c/csswg-drafts:

== Compat (not sure what spec) setting `.style.border` to `"none"` sets it to `"medium"` ==
In Firefox and Safari, this code prints "medium". In Chrome, it prints "none":
```js
let div = document.createElement("div");
div.style.border = "none";
console.log(div.style.border);
```
Neither the [HTML spec](https://html.spec.whatwg.org/multipage/), nor [CSS Style Attributes](https://drafts.csswg.org/css-style-attr/) says anything about this.

Note that when setting like that, both Firefox and Safari add `border: medium;` to the element itself, except when it already has a style attribute setting the border to `none`. (The style attribute remains unchanged in that case)
And even if the style attribute is setting the border to `none`, it is still reported as "medium" when accessing `.style.border`.

Also, this affects `element.style.setProperty("border", "none")` as well.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13343 using your GitHub account


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

Received on Tuesday, 13 January 2026 19:19:24 UTC