You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: files/en-us/web/css/css_text/whitespace/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ In a nutshell, different whitespace characters are collapsed and transformed in
174
174
175
175
### Trimming and positioning
176
176
177
-
In both [inline](/en-US/docs/Web/CSS/CSS_inline_layout/Inline_formatting_context) and [block](/en-US/docs/Web/CSS/CSS_display/Block_formatting_context) formatting contexts, elements are laid out in _lines_. In an inline formatting, lines are created by text wrapping. In a block formatting context, on the other hand, each block forms its own line. As each line is laid out, whitespace is processed further. Let's take a look at an example to explain how this works.
177
+
In both [inline](/en-US/docs/Web/CSS/CSS_inline_layout/Inline_formatting_context) and [block](/en-US/docs/Web/CSS/CSS_display/Block_formatting_context) formatting contexts, elements are laid out in _lines_. In an inline formatting context, lines are created by text wrapping. In a block formatting context, on the other hand, each block forms its own line. As each line is laid out, whitespace is processed further. Let's take a look at an example to explain how this works.
178
178
179
179
In this example, as before, we've marked the whitespace characters in a comment. We have three text nodes that contain only whitespace: one before the first `<div>`, one between the 2 `<div>`s, and one after the second `<div>`.
180
180
@@ -268,7 +268,7 @@ Different {{cssxref("white-space-collapse")}} values skip different steps of thi
268
268
269
269
-`preserve` and `break-spaces`: The whole algorithm is skipped except for step 3, so no whitespace collapsing or transformation happens.
270
270
-`preserve-spaces`: The whole algorithm is skipped, so whitespace characters at the start and end of lines are preserved.
271
-
-`preserve-breaks`: the algorithm is the same as `collapse`.
271
+
-`preserve-breaks`: The algorithm is the same as that of`collapse`.
Whitespace nodes are invisible to the website visitor due to the CSS processing rules, but they can interfere with certain layouts and DOM manipulation that rely on the exact structure of the DOM. Let's look at some common problems and how to solve them.
295
295
@@ -368,7 +368,7 @@ There are a few ways of getting around this problem:
368
368
}
369
369
```
370
370
371
-
- If you need to rely on `inline-block`, you could set the [`font-size`](/en-US/docs/Web/CSS/font-size) of the list to `0`. This only works if the blocks are not sized with `em` units (since `em` is based on the `font-size`, so the block size would also end up being sized as `0`). Using `rem` units would be a good choice here:
371
+
- If you need to rely on `inline-block`, you could set the [`font-size`](/en-US/docs/Web/CSS/font-size) of the list to `0`. This only works if the blocks are not sized with `em` units (since `em` is based on `font-size`, the block size would also end up being sized as `0`). Using `rem` units would be a good choice here:
0 commit comments