No Outer <code>margin</code>
Read OriginalThis article discusses a common anti-pattern in front-end development: applying margin or padding to the outermost element of a reusable component. It explains how this breaks encapsulation, forces 'compensations' in other components, and incorrectly makes a component responsible for external spacing. The author provides code examples and advocates for components to only manage their internal layout.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser