Skip to content

Commit 5af3e71

Browse files
authored
update
1 parent d11abce commit 5af3e71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Sometimes we want to assign a style property, and later remove it.
116116

117117
For instance, to hide an element, we can set `elem.style.display = "none"`.
118118

119-
Then later we may want to remove the `style.display` as if it were not set. Instead of `delete elem.style.display` we should assign an empty line to it: `elem.style.display = ""`.
119+
Then later we may want to remove the `style.display` as if it were not set. Instead of `delete elem.style.display` we should assign an empty string to it: `elem.style.display = ""`.
120120

121121
```js run
122122
// if we run this code, the <body> "blinks"
@@ -207,7 +207,7 @@ For instance, here `style` doesn't see the margin:
207207
</body>
208208
```
209209
210-
...But what if we need, say, to increase the margin by 20px? We want the current value for the start.
210+
...But what if we need, say, to increase the margin by 20px? We would want the current value of it.
211211
212212
There's another method for that: `getComputedStyle`.
213213
@@ -281,7 +281,7 @@ Visited links may be colored using `:visited` CSS pseudoclass.
281281
282282
But `getComputedStyle` does not give access to that color, because otherwise an arbitrary page could find out whether the user visited a link by creating it on the page and checking the styles.
283283
284-
JavaScript we may not see the styles applied by `:visited`. And also, there's a limitation in CSS that forbids to apply geometry-changing styles in `:visited`. That's to guarantee that there's no sideway for an evil page to test if a link was visited and hence to break the privacy.
284+
JavaScript may not see the styles applied by `:visited`. And also, there's a limitation in CSS that forbids to apply geometry-changing styles in `:visited`. That's to guarantee that there's no sideway for an evil page to test if a link was visited and hence to break the privacy.
285285
```
286286

287287
## Summary

0 commit comments

Comments
 (0)