Giter VIP home page Giter VIP logo

mini-unocss's Introduction

mini-unocss (WIP)

一个即时按需的原子 CSS 引擎,unocss 的 mini 版本。

注意,当前版本代码仍很不完善,mini-unocss 即将大重构,若您想参与贡献/研究原理,可关注项目开发进度。

move to amcss(重构版本)

使用

安装依赖

pnpm add @developer-plus/mini-unocss @developer-plus/mini-unocss-preset -D

修改 vite.confg.ts 文件

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { miniunocss } from '@developer-plus/mini-unocss'
import preset from '@developer-plus/mini-unocss-preset'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    miniunocss({
      presets: preset
    })
  ]
})

main.ts 引用 css 文件

import { createApp } from 'vue'
import App from './App.vue'
import 'u.css' // 新增
createApp(App).mount('#app')

目前支持的预设

  • 宽:w-100 | w-[100vw]
  • 高:h-100 | h-[100vh]
  • 背景色:bg-red | bg-#fff
  • hover:hover:w-100
  • active:active:w-200

欢迎大家踊跃提 pr 完善。

LICENSE

MIT, made with 💗.

mini-unocss's People

Contributors

alexzhang1030 avatar hongbusi avatar masterx89 avatar tickheart avatar yekezz avatar zyyv avatar

Stargazers

 avatar

Watchers

 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.