Skip to content

Commit d61571c

Browse files
committed
[css-break-4] Add example of applying 'margin-break' to inline boxes #6922
1 parent 52b59ac commit d61571c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

css-break-4/Overview.bs

+17
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,23 @@ Adjoining Margins at Breaks: the 'margin-break' property</h3>
10291029
</figure>
10301030
</div>
10311031

1032+
<div class="example">
1033+
In this example, 'margin' is used to create spacing between
1034+
styled inline <{CODE}> elements and adjacent text in a paragraph;
1035+
'margin-break' is used to discard this margin at the start and end of the line.
1036+
1037+
<pre>
1038+
CODE {
1039+
background: silver;
1040+
padding: 0.1em;
1041+
border: 1px solid;
1042+
border-radius: 0.2em;
1043+
margin: 0.2em;
1044+
margin-break: discard;
1045+
}
1046+
</pre>
1047+
</div>
1048+
10321049
<h3 id="box-splitting">
10331050
Splitting Boxes</h3>
10341051

0 commit comments

Comments
 (0)