npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

luchaocss

v1.0.1

Published

## luchaocss

Downloads

14

Readme

postcss 插件

luchaocss

npm install luchaocss --save

配置文件

// postcss.config.js
import luchaocss from 'luchaocss'
export default {
  plugins: [
    luchaocss({
       // class 名称前缀自定义,默认 "g"。如 g-m-10
      prefix: '',
      // 处理范围 content内包含的文件
      content: ['./index.html', "./src/**/*.{html,vue}"],
      /**
       * 自定义 class
       * .g-transition-linear {
       *    transition: "all 0.2s linear"
       * }
       * .g-color-333 {
       *    color: #333;
       * }
       * .g-color-666 {
       *    color: #666;
       * }
       */
      theme: {
        transition: {
          linear: 'all 0.2s linear'
        },
        color: {
          '333': '#333',
          '666': '#666',
        }
      }
    }),
  ]
}

使用

// 全局css文件中加入以下语句
@luchaocss base; // 加载 reset css,非必须
@luchaocss utilities;  // 必须引入,自动生成的css将根据该语句写入此文件
<div class="g-p-10 g-color-333">luchaocss</div>

<div :class="['g-p-10', 'g-color-333', toggle ? 'g-d-b' : 'g-d-n', {"p-o-1": toggle}]">luchaocss</div>

vscode扩展配合使用

安装扩展 luchaocss

文档

使用首字母缩写 | css | class | 说明 | | ---- | ----- | ----- | | margin: 10px | g-m-10 | | margin-top: 10px | g-mt-10 | | margin-top: 10px; margin-bottom: 10px; | g-mtb-10 | tblr顺序不敏感 | | padding: 10px | g-p-10 | | padding-top: 10px | g-pt-10 | | padding-top: 10px; padding-bottom: 10px; | g-ptb-10 | tblr顺序不敏感 | | position: fixed | g-p-f | | font-size: 20px | g-fs-20 | | color: #333 | g-c-#333 | | cursor: not-allowed | g-c-na | | background-color: red | g-bg-red | 注意background-color缩写与border-color同名,故background-color缩写为bg | | border-color: red | g-bc-red | | font-weight: 400 | g-fw-400 | | display: flex | g-d-f | | display: inline-flex | g-d-if | | height: 20px | g-h-20 | | width: 20px | g-w-20 | | z-index: 2 | g-zi-2 | | line-height: 20px | g-lh-20 | | border-width: 2px | g-bw-2 | | border-radius: 4px | g-br-4 | | border-style: solid | g-bs-s | | object-fit: cover | g-of-c | | grid-gap: 10px | g-gg-10 | | grid-row-gap: 10px | g-grg-10 | | grid-column-gap: 10px | g-gcg-10 | | align-items: flex-start | g-ai-fs | | justify-content: center | g-jc-c | | flex-direction: column | g-fd-c | | flex-grow: 1 | g-fg-1 | | top: 0 | g-t-0 | | bottom: 0 | g-b-0 | | left: 0 | g-l-0 | | right: 0 | g-r-0 | | overflow: hidden | g-o-h | | overflow-x: hidden | g-ox-h | | overflow-y: hidden | g-oy-h | | opacity: 0.1 | g-o-0.1 | | opacity: 1 | g-o-1 | | order: 2| g-o-2 | | text-align: center | g-ta-c |