column-rule-width
Example
.text {
columns: 2;
column-gap: 4px;
column-rule: 8px solid #ccc;
}.text {
columns: 2;
column-gap: 2rem;
column-rule: 2px solid #ccc;
}The rule is painted inside the gap, so the gap must be wider than the rule to keep it off the text.
Common mistakes
- A wide rule overlaps column content, because it doesn't add space.
Key points
- The rule width is not larger than
column-gap, so it doesn't overlap text. - A
column-rule-styleis set, or the rule is not drawn at any width.
Interview questions
What keywords does column-rule-width accept?
'thin', 'medium' and 'thick', or any length like '2px'. The default is 'medium'.
Does column-rule-width change the width of columns?
No. The rule is painted inside the gap and doesn't affect layout.