tachyons README

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

TACHYONS

Functional CSS for humans.

Quickly build and design new UI without writing CSS.

Principles

Features

Getting Started

Docs can be found at http://tachyons.io/docs The modules are generally pretty small and thus quick and easy to read.

Use the CDN

The quickest and easiest way to start using Tachyons is to include a reference to the minified file in the head of your HTML file.

<link rel="stylesheet" href="https://unpkg.com/tachyons@4/css/tachyons.min.css">

Local Setup

Clone the repo from Github and install dependencies through npm.

git clone https://github.com/tachyons-css/tachyons.git
cd tachyons
npm install

Dev

If you want to just use everything in tachyons/src as a jumping off point and edit all the code yourself, you can compile all of your wonderful changes by running:

npm start

This will output both minified and unminified versions of the CSS to the CSS directory and watch the src directory for changes. It's aliased to the command:

npm run build:watch

If you'd like to just build the CSS once without watching the src directory, run:

npm run build

If you want to check that a class hasn't been redefined or 'mutated,' there is a linter to check that all of the classes have only been defined once. This can be useful if you are using another library or have written some of your own CSS and want to make sure there are no naming collisions. To do this run the command:

npm run mutations

Docs

The tachyons docs located at http://tachyons.io are all open source and located at https://github.com/tachyons-css/tachyons-css.github.io

You can clone the docs and use them as a template for documenting your own design system / patterns / components. While not everything is automated, the component library generation makes it extremely easy to generate and organize the documentation for components as demonstrated at http://tachyons.io/components

Community Resources

Contributing

Please read our code of conduct for contributors.

Tachyons in Production

A longer list of sites that use tachyons in production can be found in sites.md We love letting the community see what people are building. Please add your link to sites.md in a PR or by opening an issue if you're willing to share to your site or project.

Featured Sites

And of course...

Help

If you have a question or need help feel free to open an issue here or jump into the Tachyons slack channel.

tachyons (tachyons-css/tachyons)

Searching Database…

11.7K ·GitHub
这是什么?Tachyons 是一个功能型 CSS 框架,用于快速构建快速、响应式的界面,无需编写自定义 CSS。你只需组合小巧、单一用途的工具类即可搭建界面。
这是 UI 组件库,还是只是一组工具类?它是一个以工具类优先的 CSS 库(不是组件库,也不是 JS 框架),由单一用途的类组成,你在 HTML 中组合使用,理念上类似于原子化/功能型 CSS 工具。
怎样把它添加到项目中?最简单的方式是在 HTML 的 head 中通过 CDN 链接引入压缩版 CSS 文件,或克隆仓库后使用 npm 安装依赖进行本地开发。
使用它需要构建工具吗?不需要,直接在纯 HTML 中使用 CDN 链接即可。只有当你想修改源码,并借助所附带的基于 PostCSS 的工具自行编译时,才需要构建步骤。
它兼容 React 或 Angular 这类框架吗?兼容。因为它只是 CSS 类,所以可以用于纯 HTML,也可以配合任何 JS 框架使用。
这个 CSS 文件有多大?Tachyons 非常轻量,大约 14kB,并针对最大限度的 gzip 压缩进行了优化。
它是否包含响应式网格系统?包含。它自带一个可无限嵌套、完全响应式的网格系统。
它提供哪些无障碍功能?它包含 490 种无障碍配色组合,并且在设计上确保 CSS 不会妨碍无障碍访问或 HTML 的默认功能。
我如何检查类名冲突?运行所附带的 linter(immutable-css),执行 'npm run mutations',以确认没有任何类被重复定义超过一次。
Size
18.1 MB
Stars
11.7K
Age
12y
Commits · 90 Days