RT Ahmad Shadeed
💡In flexbox, pseudo-elements are treated as flex items.
In the example, the line is filling the available space, and the margin will flip based on the direction thanks to CSS logical properties.
h2:after {
flex: 1;
margin-inline-start: 0.5rem;
}
🔗
https://codepen.io/shadeed/pen/yLpWBmP