1
1
mirror of https://github.com/primer/css.git synced 2024-11-26 23:56:04 +03:00
The CSS design system that powers GitHub
Go to file
Cameron Dutro 5cfae2c219
Toggle switch styles (#2074)
* Add styles for the ToggleSwitch component

* Add changeset

* Disable stylelint temporarily; commit stylelint fixes

* Refactor CSS; add stories

* Clean up; rename ToggleSwitch-switch to ToggleSwitch-track

* Address a bunch of PR feedback:
* Rename ToggleSwitch-bg -> ToggleSwitch-icons
* Rename ToggleSwitch-label -> ToggleSwitch-status
* Collapse border-* styles into a single border-style property
* Replace CSS with touch target @include
* Remove unnecessary :after pseudo-element

* Remove sr-only span, as it's redundant

* Collapse border-* properties again (stylelint didn't like argument order last time)

Co-authored-by: Mike Perrotti <mperrotti@github.com>
2022-05-23 14:06:42 -07:00
__tests__ Removing the duplicate deprecation backgrounds (#1663) 2021-10-08 09:20:20 -07:00
.changeset Toggle switch styles (#2074) 2022-05-23 14:06:42 -07:00
.github Bump tj-actions/changed-files from 18.6 to 19 (#2051) 2022-05-19 12:53:22 -07:00
.vscode Storybook enhancements - prototyping + docs (#1747) 2021-11-16 11:46:47 -08:00
docs Toggle switch styles (#2074) 2022-05-23 14:06:42 -07:00
script add deployment workflows for GitHub Pages (#2038) 2022-04-19 16:26:47 -07:00
src Toggle switch styles (#2074) 2022-05-23 14:06:42 -07:00
.eslintrc.json Convert package to a ES module (#1528) 2021-08-11 14:10:47 -07:00
.gitignore create pretest script 2021-03-31 22:40:51 -07:00
.npmignore ignore vercel.json 2021-04-07 09:10:53 -07:00
.npmrc Remove save-exact 2022-01-18 13:24:50 -08:00
.vercelignore Revert "change names back" 2021-04-11 15:51:18 -07:00
CHANGELOG.md Version Packages (#2079) 2022-05-19 11:46:38 -07:00
CODE_OF_CONDUCT.md Move standard docs to root (#1454) 2021-06-10 12:09:59 +09:00
CONTRIBUTING.md Update contributing docs with npx changeset step (#1987) 2022-03-09 09:13:21 -08:00
deprecations.js Updating deprecations.js file to be more straightforward (#1581) 2021-09-10 10:54:26 -07:00
DEVELOP.md add deployment workflows for GitHub Pages (#2038) 2022-04-19 16:26:47 -07:00
LICENSE Updating docs to reflect new release workflow 2021-04-01 13:36:44 -07:00
package.json Bump jest from 27.5.1 to 28.1.0 (#2086) 2022-05-19 12:15:30 -07:00
postcss.config.cjs Bump stylelint and stylelint-scss (#1697) 2021-10-28 17:47:09 +00:00
prettier.config.cjs Convert package to a ES module (#1528) 2021-08-11 14:10:47 -07:00
README.md Set alt attribute on README img (#1940) 2022-02-17 06:46:40 -08:00
RELEASING.md Move standard docs to root (#1454) 2021-06-10 12:09:59 +09:00
stylelint.config.cjs Updating and autofixing stylelint (#1765) 2021-12-08 11:39:38 -08:00
yarn.lock Bump jest from 27.5.1 to 28.1.0 (#2086) 2022-05-19 12:15:30 -07:00

Primer CSS

The CSS implementation of GitHub's Primer Design System

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. After installing with npm, 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