Styled System has a Code of Conduct. Please review and help enforce this code of conduct to help us foster an open and inclusive project.
Feel free to contribute by opening and commenting on issues, helping answer questions, updating docs, or opening a pull request. For quick bug fixes or PRs that address an open issue, feel free to open a PR. If you'd like to suggest a new feature or change to the API, please open an issue for discussion first.
To submit a pull request, follow these steps
- Fork and clone this repo
- Create a branch for your changes
- Install dependencies with
npm install
- Ensure tests are passing by running
npm test
- If you're fixing a bug, it's recommended to write a failing test before writing any code
- Make changes locally and commit them
- Try to make sure tests still pass and that there's 100% coverage
- Push your branch to origin
- Open a pull request in this repository with a clear title and description and link to any relevant issues
- Wait for a maintainer to review your PR
The documentation site is a separate package in the docs/
folder.
To view the documentation site locally, run the following:
cd docs
npm install
npm start
Styled system is intentionally decoupled from React and the CSS-in-JS libraries it works with.
It's a very small library of utility functions that accept props
as an argument and return CSS style objects.
To avoid additional build tools, the entire source code is in a single src/index.js
file,
with the core part of the library at the top and built-in style functions below.
This allows users of this library to take advantage of features like tree-shaking in webpack.
The packages/
folder contains other npm packages and experiments related to the core library.
Many of these have been made redundant by upstream changes in libraries like styled-components
and emotion
,
but can be forked or used as a reference point for people using Styled System.