Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/strarsis/box-sizing-border-box

Best practice for setting box-sizing: border-box, taken from css-tricks
https://github.com/strarsis/box-sizing-border-box

border-box box-sizing css css3 inheritance sass

Last synced: about 11 hours ago
JSON representation

Best practice for setting box-sizing: border-box, taken from css-tricks

Awesome Lists containing this project

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/ .
```css
html {
box-sizing: border-box;
}

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

## Usage

### webpack (SCSS) + node_modules loader
```scss
@import "~box-sizing-border-box";
````

### eyeglass (SCSS):
```scss
@import 'box-sizing-border-box';
````