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 🙏

© 2025 – Pkg Stats / Ryan Hefner

c-common-scss

v1.0.0

Published

基于scss实现css原子化,类似tailwindcss

Readme

npm下载量:downloads

欢迎使用c-common-scss

安装

// npm安装方式,插件市场导入无需执行此命令。插件市场导入地址:https://ext.dcloud.net.cn/plugin?id=23183
npm install c-common-scss

使用方法

App.vue文件引入

<style lang="scss">
	// 插件市场引入
	@import "uni_modules/c-common-scss";
	// npm引入
	@import "c-common-scss";
</style>

在页面中使用

<template>
	<view class="bg-white">
		<view class="w-100 h-100 bg-theme">
			123
		</view>
		<view class="p-20-40">
			<view class=" h-200 double-center color-white">
				666
			</view>
		</view>
	</view>
</template>

样式基础值

c-common-scss/index.scss文件中可修改相对应样式

$themeColor: #09b4f1;	// 主题色
$borderColor: #f2f2f2; 	// border的颜色
$maxVal: 200;		// 循环最大数值
$maxShowText: 3;	// 文本溢出省略最大能省略几行
$baseMultiple: 2;	// 默认倍数,2的正整数倍,例如只能设置p-2,设置p-1不生效
$baseValue: 1rpx;	// 默认一个单位

宽度、高度、圆角、字体大小、行高、top、left、right、bottom;

|类名|具体样式| |--|--| |w-2|width: 2rpx;| |h-2|height: 2rpx;| |rounded-2|border-radius: 2rpx;| |font-size-2|font-size: 2rpx;| |line-height-2|line-height: 2rpx;| |top-2|top: 2rpx;| |left-2|left: 2rpx;| |right-2|right: 2rpx;| |bottom-2|bottom: 2rpx;|

display

|类名|具体样式| |--|--| |block|display: block;| |inline-block|display: inline-block;| |flex|display: flex;| |inline-flex|display: inline-flex;| |none|display: none;|

padding和margin,以下为padding示例,margin类似,把“p-”换成“m-”

|类名|具体样式| |--|--| |p-2|padding: 2rpx;| |p-2-4|padding: 2rpx 4rpx;| |p-x-2|padding: 0 2rpx;| |p-y-2|padding: 2rpx 0;| |p-t-2|padding-top: 2rpx;| |p-l-2|padding-left: 2rpx;| |p-r-2|padding-right: 2rpx;| |p-b-2|padding-bottom: 2rpx;|

border

|类名|具体样式| |--|--| |border|border: 1px solid $borderColor;| |border-theme|border: 1px solid $themeColor;| |border-top|border-top: 1px solid $borderColor;| |border-left|border-left: 1px solid $borderColor;| |border-right|border-right: 1px solid $borderColor;| |border-bottom|border-bottom: 1px solid $borderColor;|

flex相关属性

|类名|具体样式| |--|--| |flex-1|flex: 1;| |flex-shrink-0|flex-shrink: 0;| |上面样式默认不加display: flex;|下面样式默认加display: flex;| |flex-wrap|flex-wrap: wrap;| |flex-nowrap|flex-wrap: nowrap;| |flex-wrap-reverse|flex-wrap: wrap-reverse;| |flex-row|flex-direction: row;| |flex-row-reverse|flex-direction: row-reverse;| |flex-column|flex-direction: column;| |flex-column-reverse|flex-direction: column-reverse;| |j-c-start|justify-content: flex-start;| |j-c-end|justify-content: flex-end;| |j-c-center|justify-content: center;| |j-c-between|justify-content: space-between;| |a-i-start|align-items: flex-start;| |a-i-end|align-items: flex-end;| |a-i-center|align-items: center;| |a-i-between|align-items: space-between;| |double-center|align-items: center;justify-content: center;|

文本

|类名|具体样式| |--|--| |nowrap|white-space: nowrap;| |break-all|word-break: break-all;| |bold|font-weight: bold;| |text-left|text-align: left;| |text-right|text-align: right;| |text-center|text-align: center;| |text-overflow-1|文本溢出省略,最多3行,配置$maxShowText可更改上限|

颜色

|类名|具体样式| |--|--| |bg-white|background-color: #fff;| |bg-theme|background-color: $themeColor;| |color-white|color: #fff;| |color-theme|color: $themeColor;| |color-placeholder|color: #c0c4cc;| |color-999|color: #999;| |color-666|color: #666;| |color-333|color: #333;|

定位

|类名|具体样式| |--|--| |static|position: static;| |fixed|position: fixed;| |absolute|position: absolute;| |relative|position: relative;| |sticky|position: sticky;有做top、z-index处理,不需要可以去掉;还有做h5环境兼容标题栏(导航栏),不需要可以去掉|

其他

|类名|具体样式| |--|--| |full-width|width: 100%;| |full-height|height: 100%;| |box-shadow|box-shadow: 0 0 10rpx 2rpx rgba(#000, 0.04);| |rounded-999|border-radius: 999rpx;| |rounded-circle|border-radius: 50%;| |hidden|overflow: hidden;| |scroll|overflow: scroll;| |scroll-x|overflow-x: scroll;| |scroll-y|overflow-y: scroll;| |nomore|列表加载底部文字样式| |card|卡片样式| |border-box|box-sizing: border-box;|