css README

The project's README from github.com/primer/css. As one markdown file: README.md.

Primer CSS

The CSS implementation of GitHub's Primer Design System

npm package build status contributors graph last commit license

:warning: This project is in KTLO mode! Use existing utility classes from this project where needed. For more complete patterns that include styling and markup, please use primer/react or, if necessary, primer/view_components.

Documentation

Our documentation site lives at primer.style/css. You'll be able to find detailed documentation on getting started, all of the components, our theme, our principles, and more.

Install

This repository is distributed with npm. After installing npm, you can install @primer/css with this command:

npm install --save @primer/css

Usage

The included source files are written in Sass using SCSS syntax. Once installed, you can add your project's node_modules directory to your Sass include paths (AKA load paths in Ruby), then import it like this:

@import "@primer/css/index.scss";

You can import individual Primer modules directly from the @primer/css package:

@import "@primer/css/core/index.scss";
@import "@primer/css/product/index.scss";
@import "@primer/css/marketing/index.scss";

Development

See DEVELOP.md for development docs.

Releasing (for GitHub staff)

You can find docs about our release process in RELEASING.md.

License

MIT © GitHub

css (primer/css)

Searching Database…

13K ·GitHub
这是什么?Primer CSS 是 GitHub 设计系统的样式表实现,也就是支撑 github.com 外观的那个开源 @primer/css 包。
那它是我能引入自己项目里的 CSS 框架,还是 GitHub 内部用的东西?它是一个面向任何 Web 项目的 CSS 框架:SCSS 语法的 Sass 源码,从 npm 安装后通过你自己的构建流程引入,并不是 GitHub 专用的工具。
怎么把它加到项目里?先装好 npm,运行 npm install @primer/css,然后把该包的 node_modules 文件夹加到你的 Sass include 路径里。完整文档在 primer.style/css。
我的构建环境需要具备什么才能用它?需要 Node 和 npm(该包要求 Node 16 以上),构建链里还要有 Sass 编译器,因为 Primer 发布的是 SCSS 源码,不是现成的纯 CSS。
它还是搭建 GitHub 风格界面的推荐方式吗,还是已经过时了?它处于 KTLO(维持现状)模式:只做维护。想要带样式和标记的完整组件模式,请用 primer/react 或 primer/view_components;现有的工具类仍然可以放心使用。
我能在商业项目里用它吗?可以——它由 GitHub 以 MIT 协议开源,商业使用完全没问题。
这个项目够成熟吗?非常成熟——GitHub 从 2015 年 3 月起就公开开发 Primer,仓库目前大约有 13,000 颗星。GitHub 自己的产品用的就是这套设计系统。
这个仓库里也有 JavaScript 组件吗?没有——它只包含 CSS 层:纯 Sass 源码,没有任何运行时依赖。完整的标记和交互组件在 Primer 的姊妹包里。
What are similar projects?mdb-ui-kit, daisyui, NES.css, yeti, weui, blueprint, tachyons, bootstrap
Creator
primer
Size
38.4 MB
Stars
13K
Age
11y
Commits · 90 Days