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

web-base-css

v2.0.6

Published

一套应用于web页面的基础样式类库

Downloads

18

Readme

关于项目

  • 适用场景:使用了UI组件库(如ant-design,element,iview等)的web系统
  • 功能:提供统一易用的基础样式类库,以减少在项目开发中编写冗余css,并实现UI界面的整体一致性
  • 不同于其他css库,本项目遵从最小颗粒样式原则,你可以自由组合类名以达到复合样式展现的目的
  • 项目内部引入normalize.css库,以解决现代html元素在各个浏览器端表现不一的问题

类名的命名规则:

总原则:面向属性命名、对开发者透明且有表现意义、所有字母均小写,单个中划线作为辅助

|分类|规则|示例| |:--:|:--|:--| | 属性值为数字类型的类名命名规则 | 数值与属性之间不加中划线 | m10 —> margin: 10pxmr10 —> margin-right: 10pxpt40 -> padding-top: 40pxw80 -> width: 80px | | 属性值为非数字类型的类名命名规则 | 属性名首字母缩写-属性值单词首字母缩写 | dis-ib -> display: inline-blockta-c -> text-align: center td-ol -> text-decoration: overline| |首字母简写有歧义的属性命名| 采用属性名单词缩写形式命名 | dis-ib -> display: inline-block |

使用介绍

  1. npm i web-base-css
  2. 全局引入webBaseCSS: import 'web-base-css/dist/index.css';
  3. 在需要设置样式的标签上定义类,如 <div class="mt10 w200"></div> 表示对div设置margin-top: 10px; width: 200px
  4. normalize.css