NPM
npm i --save border-box.css
Yarn
yarn add border-box.css
Then, in your root application file:
import 'border-box.css'
You will need to use a bundler like webpack
that can process css files!
- Apply
box-sizing: border-box
to all elements on a page. This makes development more consistent across all browsers.
Yes, because I wanted to. NPM is filled with tiny modules. I created this so that I wouldn't forget to write this boilerplate in my projects.
Maybe. But it's also a module that does one thing really well!
This entire package comes from the technique laid out in this excellent article from css-tricks