DEV Community

Discussion on: 10 Awesome SASS (SCSS) Mixins

Collapse
 
simeon4real profile image
Simeon Udoh

Very insightful post Alejandro! I'll try out some of your mixins. I currently use a reset mixin. It helps me with a reset every time I start a new project.

@mixin reset {
margin: 0;
padding: 0;
box-sizing: inherit;
}

Then I just set box sizing via html. {}.

Collapse
 
alemesa profile image
Alejandro Mesa

Thank you! I have definitely seen this one. I do something similar in my global styles:

html {
  box-sizing: border-box;

  *,
  *::before,
  *::after {
    box-sizing: inherit;
  }

  // All html elements that I need to reset
  h1, h2, h3, h4, h5, h6, p, ul, ol {
    padding: 0;
    margin: 0;
  }
}

Another option is too use a css reset file, this one is pretty good dev.to/hankchizljaw/a-modern-css-r... by @hankchizljaw