Last active
November 27, 2017 20:30
-
-
Save philzelnar/1f67e48fba99e9c06e81dabaf62ae5dd to your computer and use it in GitHub Desktop.
A sass mixin to reset CSS on an element. Three options to pass in: spacing, list, or everything.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick CSS Resets for Sass | |
// | |
// .example { | |
// @include reset(spacing); | |
// } | |
@mixin reset($type: null) { | |
@if $type == spacing { margin: 0; padding: 0; } | |
@if $type == list { margin: 0; padding: 0; list-style: none; | |
& li { margin: 0; padding: 0; } | |
} | |
@if $type == everything { float: none; position: static; height: auto; width: auto; margin: 0; padding: 0; background-color: transparent; border: none; list-style: none; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment