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

@qingui/var

v0.0.4

Published

一个基础的 scss 变量库(包含重置样式),支持 vue2.x,3.x,和所有现代库。(全部变量在文末)

Downloads

1

Readme

@qingui/var

一个基础的 scss 变量库(包含重置样式),支持 vue2.x,3.x,和所有现代库。(全部变量在文末)

快速上手

安装

$ npm install @qingui/var -S

vue 项目使用

├─ src
│ └─ styles
└─ └─ var.scss // 全局变量

\var.scss

@import '../../node_modules/@qingui/var/index.scss';

// 可以覆盖变量值,如果不写默认执行@qingui/var里的变量,全部变量在文末
$primary-color: red;
$success-color: green;

按需使用

<template>
  <div class="demo">示例</div>
</template>

<style lang="scss" scoped>
@import '../styles/var.scss'; // 这里需注意路径引入

.demo {
  color: $primary-color;
}
</style>

全局调用(vite.config.js)

vue.cli 需在 vue.config.js 中配置

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `@import "./src/styles/var.scss";`,
      },
    },
  },
})

全部变量

// Colors
$primary-color: #409eff !default;
$success-color: #67c23a !default;
$info-color: #909399 !default;
$warning-color: #e6a23c !default;
$danger-color: #f56c6c !default;
$normal-color: #d9d9d9 !default;
$white: #fff !default;
$black: #000 !default;

// Base
$body-background: #fff !default;
$component-background: #fff !default;
$font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
  '微软雅黑', Arial, sans-serif !default;
$code-family: Consolas, Menlo, Courier, monospace !default;
$title-color: #17233d !default;
$text-color: #515a6e !default;
$text-color-secondary: fade($black, 45%) !default;
$font-size-base: 14px !default;
$font-size-sm: 12px !default;
$font-size-lg: $font-size-base + 2px !default;
$border-radius-base: 6px !default;
$border-radius-small: 4px !default;
$cursor-disabled: not-allowed !default;

// vertical margins
$margin-lg: 24px !default; // containers
$margin-md: 16px !default; // small containers and buttons
$margin-sm: 12px !default; // Form controls and items
$margin-xs: 8px !default; // small items

// vertical paddings
$padding-lg: 24px !default; // containers
$padding-md: 16px !default; // small containers and buttons
$padding-sm: 12px !default; // Form controls and items
$padding-xs: 8px !default; // small items

// Border color
$border-color-base: #dcdee2 !default; // outside
$border-color-split: #e8eaec !default; // inside
$border-width-base: 1px !default; // width of the border for a component
$border-style-base: solid !default; // style of a components border

// Shadow
$shadow-color: rgba(0, 0, 0, 0.2) !default;
$shadow-card: 0 1px 1px 0 rgba(0, 0, 0, 0.1) !default;
$shadow-up: 0 -1px 6px $shadow-color !default;
$shadow-down: 0 1px 6px $shadow-color !default;
$shadow-left: -1px 0 6px $shadow-color !default;
$shadow-right: 1px 0 6px $shadow-color !default;
$shadow-base: $shadow-down !default;

联系或提议题

[email protected]