minirem.css
v0.0.4
Published
A mobile css layout
Downloads
10
Maintainers
Readme
minirem.css
A mobile layout css with rem
- no javascript
- prefer to use unit
vw
Install
npm i minirem.css --save
Usage
- based on 750px design draft
- 1rem = 100px
Module
import 'minirem.css'
Browser
<link rel="stylesheet" href="minirem.css">
Example
css
.main {
width: 1rem; // 100px
}
sass
// variable.scss
$baseFontSize:100;
@function px2rem($px){
@return $px / $baseFontSize * 1rem;
}
// index.scss
@import "variable";
.main {
width: px2rem(100);
}