Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
volttide55816dI giggled 😅
- throws up the <div/> hand sign -
10Dev40116dAlso, please never add line breaks after your <span>s
mcfly52216dI just used a span with a display block, will change it 😅
melezorus34227416dI do inline-block, I'm chill.
Text needs to be auto-width for desktop, but 100% width for mobile.
Very common use case.
One could change their entire layout to one column with just
Inline-block would maybe still be better... but it would work.
webketje8807d@HiFiWiFiSciFi span is not meant for layout, span is meant for inline styling and semantics. Span shouldn't contain an entire paragraph, that would be <p>.
In the usecase you provided the right thing to do would be to enclose the span in a div, p tag or other block-level element and apply layout changes to that.