Code Monkey home page Code Monkey logo

px2rem-loader's Introduction

px2rem-loader

将css中的px单位转换为rem输出

####useage:

//  webpack.config.js

{
        test: /\.css$/,
        loader: 'style-loader!css-loader!px2rem-loader?base=37.5&scale=2&minSize=1&ignore=border|margin|padding'
    }

参数说明:

  • base: 基数,默认值2,Number
  • scale: 缩放比,最终计算出的rem大小等于 (原来设定的px值 / base / scale),默认值2,Number
  • minSize: 最小单位,当设置的px值小于该值时忽略计算,默认值2,Number
  • ignore: 忽略的样式规则,如有多个,用"|"分隔,默认值空数组,String

px2rem-loader's People

Stargazers

tianleiyiji123 avatar lixiang avatar

Watchers

James Cloos avatar Steve avatar

Forkers

libin1991

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.