Skip to content

Commit

Permalink
Update Rule “do-you-avoid-using-inherit-value-of-style-display/rule”
Browse files Browse the repository at this point in the history
  • Loading branch information
BrookJeynes committed Nov 6, 2023
1 parent c2960cd commit 0928d50
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions rules/do-you-avoid-using-inherit-value-of-style-display/rule.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
type: rule
archivedreason: IE7 is no longer supported
title: Do you avoid using "inherit" value of style.display?
guid: a99dd941-f70a-4aa6-8526-fd2ee1b547c7
uri: do-you-avoid-using-inherit-value-of-style-display
created: 2010-12-02T10:35:22.0000000Z
authors: []
related: []
redirects:
- do-you-avoid-using-"inherit"-value-of-style-display

- do-you-avoid-using-"inherit"-value-of-style-display
created: 2010-12-02T10:35:22.000Z
archivedreason: IE7 is no longer supported
guid: a99dd941-f70a-4aa6-8526-fd2ee1b547c7
---
The property value “inherit” of style.display is not recognized by IE7 and IE7 compatibility mode. So if you use this value in Javascript, it will cause script error in IE7 and IE7 compatibility like: "Message: Could not get the display property. Invalid argument."

The property value “inherit” of style.display is not recognized by IE7 and IE7 compatibility mode. So if you use this value in Javascript, it will cause script error in IE7 and IE7 compatibility like: 
            "Message: Could not get the display property. Invalid argument."
So to make your Javascript and CSS style more compatible and avoid using "inherit" value of style.display:
<!--endintro-->

<!--endintro-->

```
```js
divLoading.style.display = "inherit";
```

Bad code - inherit property
::: bad
Bad code - inherit property.
:::

```
```js
divLoading.style.display = "block";
```

Good code - block property
::: good
Good code - block property.
:::

0 comments on commit 0928d50

Please sign in to comment.