diff --git a/src/index.styl b/src/index.styl index c586c44..780a85d 100644 --- a/src/index.styl +++ b/src/index.styl @@ -1,4 +1,8 @@ +@import "reset-context"; + .switch { + reset-context(); + position: relative; display: inline-block; width: 48px; diff --git a/src/reset-context.styl b/src/reset-context.styl new file mode 100644 index 0000000..e5e055c --- /dev/null +++ b/src/reset-context.styl @@ -0,0 +1,9 @@ +reset-context() { + // https://www.paulirish.com/2012/box-sizing-border-box-ftw/ + box-sizing: border-box; + *, *:before, *:after { + box-sizing: inherit; + } + + line-height: 20px; +}