box-sizing-border-box
v1.5.0
Published
Best practice for setting box-sizing: border-box, taken from css-tricks
Downloads
226
Maintainers
Readme
box-sizing-border-box
Best practice for setting box-sizing: border-box.
From https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ .
Installation
Using npm
:
npm install --save-dev box-sizing-border-box
Using yarn
:
yarn add --dev box-sizing-border-box
What's inside?
See https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ .
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
Usage
webpack (SCSS) + node_modules loader
@import "~box-sizing-border-box";
eyeglass (SCSS):
@import 'box-sizing-border-box';