From 0928d50b2b1eac1010644df512384fa9fb01a7f8 Mon Sep 17 00:00:00 2001 From: "Brook Jeynes [SSW]" Date: Tue, 7 Nov 2023 08:49:05 +1000 Subject: [PATCH] =?UTF-8?q?Update=20Rule=20=E2=80=9Cdo-you-avoid-using-inh?= =?UTF-8?q?erit-value-of-style-display/rule=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/rules/do-you-avoid-using-inherit-value-of-style-display/rule.md b/rules/do-you-avoid-using-inherit-value-of-style-display/rule.md index 8797fe61355..f5efadc25e1 100644 --- a/rules/do-you-avoid-using-inherit-value-of-style-display/rule.md +++ b/rules/do-you-avoid-using-inherit-value-of-style-display/rule.md @@ -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: - + -``` +```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. +::: \ No newline at end of file