Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/strarsis/box-sizing-border-box
- Owner: strarsis
- License: mit
- Created: 2017-09-11T20:06:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-06T16:58:21.000Z (over 2 years ago)
- Last Synced: 2024-10-18T23:55:11.159Z (about 1 month ago)
- Topics: border-box, box-sizing, css, css3, inheritance, sass
- Language: CSS
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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';
````