Inline Layout without Browser Hacks

suggest change

inline-block works without the old zoom and star-property hacks. For a component that needs internal alignment, inline-flex or inline-grid is often more expressive:

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}

The component participates in surrounding text as an inline-level box while arranging its children with Flexbox.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents