Skip to content

Commit 24dfb1f

Browse files
authored
Remove description of inconsistency between Chrome and Firefox
Firefox v105 also shows `10px`.
1 parent ff4ef57 commit 24dfb1f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

2-ui/1-document/08-styles-and-classes/article.md

-14
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,6 @@ So nowadays `getComputedStyle` actually returns the resolved value of the proper
269269
We should always ask for the exact property that we want, like `paddingLeft` or `marginTop` or `borderTopWidth`. Otherwise the correct result is not guaranteed.
270270
271271
For instance, if there are properties `paddingLeft/paddingTop`, then what should we get for `getComputedStyle(elem).padding`? Nothing, or maybe a "generated" value from known paddings? There's no standard rule here.
272-
273-
There are other inconsistencies. As an example, some browsers (Chrome) show `10px` in the document below, and some of them (Firefox) -- do not:
274-
275-
```html run
276-
<style>
277-
body {
278-
margin: 10px;
279-
}
280-
</style>
281-
<script>
282-
let style = getComputedStyle(document.body);
283-
alert(style.margin); // empty string in Firefox
284-
</script>
285-
```
286272
````
287273

288274
```smart header="Styles applied to `:visited` links are hidden!"

0 commit comments

Comments
 (0)