0.0.1 • Published 5 years ago

comporessed-biscuit v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

compressed biscuit

styled-component-plugin compression style sheets

安装

功能

使用

v1.0.0

styled.div(biscuit`
    position: absolute 0  0; // 位置
    size: 120px 120px; // 大小
    distance: 20px | 20px; // 外边距 | 内边距
    text: - 14px - red | 1.2; // 文本 ( 文字 | 行 )
    border: 1px solid red; // 
    ...
`)

v2.0.0 支持所有 css 的语法

扩展

  1. 提交到项目库里面
  2. 先添加定义再使用
biscuit.extends('round', (params) => {
    return {
        width: `${params[0] * 2}${params[1]}`; // 半径
        height: `${params[0] * 2}${params[1]}`;
        border-radius: 50%;
    }
});

使用扩展

styled.div(biscuit`
    round: 10px;
    border: 1px solid red;
`)

API

0.0.1

5 years ago