Coder Social home page Coder Social logo

momtboy / assembly-css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zj1024/assembly-css

0.0 1.0 0.0 822 KB

A library for quickly writing CSS by combining classes

Home Page: https://zj1024.github.io/assembly-css/

License: MIT License

JavaScript 4.82% CSS 93.52% Shell 1.66%

assembly-css's Introduction

AssemblyCss

通过组合class方式快速书写css的库

MIT SIZE VERSION


介绍

assembly-css 是一个通过sass, gulp 构建完成的css库, 提供了基础的css样式类, 在开发大型项目避免书写重复的css样式。

过多的考虑 在小型项目中由于代码量不大, 加上库的体积, 反而不建议使用

文档

中文 | 英文

安装

CDN 引入

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/assembly-css/dist/assembly-css.css">

生产环境使用压缩版本

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/assembly-css/dist/assembly-css.min.css">

NPM 引入

# 最新稳定版
$ npm install assembly-css
import 'assembly-css/lib/index.scss'

快速开发三栏布局

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/assembly-css/dist/assembly-css.css">
<section class="flex j-between">
  <div class="w-200 bg-green">left</div>
  <div class="flex-1 bg-blue">content</div>
  <div class="w-200 bg-green">right</div>
</section>

你可以直接拷贝到自己的demo文件里尝试下运行效果, 也可以点击这里查看写好的例子

优点

  • 方便快捷 通过npm安装或直接引入css文件, 随时可用, 在大型项目中表现尤为出色
  • 代码样式逻辑更加清晰
  • 易维护 在团队开发过程中, 修改样式只需要更改DOM上的类即可, 避免了DOM逐级嵌套样式的混乱

提问

你可以在issues直接提问

最后

如果你对这个项目有兴趣, 欢迎PR

assembly-css's People

Contributors

zj1024 avatar dependabot[bot] avatar jingyu1024 avatar

Watchers

James Cloos avatar

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.