Code Monkey home page Code Monkey logo

al-ui's Introduction

al-ui

Labrador 组件基础样式库

目前基础样式类已经完备,但是各种组件样式仍在不断开发中

使用

在你的组件less样式文件中直接引用,然后就可以在你的样式文件中使用less变量和mixin

@import 'al-ui';

.foo{
  .padding-bottom-large;
  color: @success;
  font-size: @font-size-large;
}

也可以直接在组件的XML中使用已定义的class

<view class="margin-large">
  <button class="btn btn-success btn-block">Submit</button>
</view>

不必担心引用整个样式库会导致你的组件的less文件变得非常庞大,因为在发布小程序时运行 labrador build -m 命令的 -m 参数能够强力压缩less文件,会将未用到的所有class全部丢弃,只保留XML中用到的。

贡献

欢迎你向本项目贡献代码,开发本项目步骤为:

# 克隆项目到本地
git clone https://github.com/maichong/al-ui.git
cd al-ui

# 安装依赖
npm install

# 编辑 templates 目录下的 .swig 文件

# ...

# 编译
npm run build

注意,项目中的所有 *.less 文件均为编译生成,请勿直接修改,开发时应修改 templates 目录下对应的 *.swig 文件。

除此之外,我们强烈推荐使用 labrador-dev 环境进行开发。

al-ui's People

Stargazers

DylanYang avatar

Watchers

James Cloos avatar  avatar Mr.Li avatar  avatar pang avatar

Forkers

yuyangame

al-ui's Issues

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.