Follow

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;
}
🔗
codepen.io/shadeed/pen/yLpWBmP

:sys_twitter: twitter.com/shadeed9/status/15

· · Twitter · 0 · 0 · 0
Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。