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

@limm/markrgba-css

v0.8.0

Published

a mark class for css.

Downloads

3

Readme

markrgba-css

1️⃣ 简介

Github:https://github.com/SunSeekerX/markrgba-css

原作者:https://gitee.com/CLQing/MarkrgbaCss_UniApp

这是一些 css 的简写类名的库,用于开发 uni-app。适用于 vue+nvue 文件。

在写代码的过程中,写 css 是非常头疼的事情,例如:

  1. 命名;这应该是所有程序员的痛。
  2. 写 dom 不能直接写 css;html 和 css 通常不在一块,需要滑动很长才能找到 css 定义的地方。
  3. 很多重复定义;像 diaplay: flex; 这样的代码在 css 中写了太多太多

想写的标准规范。找了 bem 规范,实际用起来非常不方便。因为是结合 scss,如果我用了 & 那我我在文档中搜索 css 定义的地方非常不方便。

偶尔发现了类似 fd-r pt-10 w-150 h-80 fw-w pr-15 这样的写法。一开始看起来非常的乱,无法维护。

当我理解了之后真香!这就是经验的结晶。上面的意思是

.fd-r {
  flex-direction: row;
}
.pt-10 {
  padding-top: 10rpx;
}
.w-150 {
  width: 150rpx;
}
.h-80 {
  height: 80rpx;
}
.fw-w {
  flex-wrap: wrap;
}
.pr-15 {
  padding-right: 15rpx;
}

现在我的代码:

hx.png

2️⃣ 快速上手

安装

npm i @limm/markrgba-css

导入

推荐全部引入,开启 treeshaking 会自动裁剪没有用到的类

${app}/App.vue

@import '@limm/markrgba-css';

使用

就是简介图上直接添加 class 就行了。

4️⃣ class

| | | | | :-------: | :-----------------------: | :-: | | .bw-${x} | border-width: xpx; | | | .bw-${x}r | border-width: xrpx; | | | .btw-${x} | border-top-width: ${x}px; | |

5️⃣ 更新日志(CHANGELOG)

0.7.0

功能(Features)

  • 增加 z-1z-100z-index: n;

0.5.0

BREAKING CHANGES

  • w-xp => wp-x
  • 移除 nvue 直接引入就能使用