Stacks is Stack Overflow’s design system. It includes the resources needed to create consistent, predictable interfaces and workflows that conform to Stack Overflow’s principles, design language, and best practices.
Our documentation is built with Stacks itself, using its immutable, atomic classes and components.
The Stacks website documents:
- Semantic and accessible component markup
- Cross-browser compatible Less / CSS
- An icon library
- Email templates & components
Stacks documentation can be found at https://stackoverflow.design/
Table of contents
- Using Stacks
- Building Stacks
- Linting Stacks
- Testing Stacks
- Releasing Stacks
- Bugs and feature requests
Using Stacks is outlined in our usage guidelines.
To contribute to Stacks documentation or its CSS library, you’ll need to build Stacks locally. View our building guidelines.
Having trouble getting these steps to work? Open an issue with a
Run all lint suites by running:
npm run lint
Lint the styles (stylelint) by running:
npm run lint:css
Lint the typescript source code (eslint) via running:
npm run lint:ts
Lint the source code format (prettier) via running:
npm run lint:format
Run all test suites by running:
Unit/Component tests are written with DOM Testing Library. Please follow the library's principles and documentation to write tests.
Execute the unit/component tests suite by running:
npm run test:unit
or if you prefer watch mode run:
npm run test:unit:watch
Visual Regression Tests
In order to pull and upload baseline images you need to have
git lfs installed in your local machine. Please follow this guide to install that.
Execute the visual regression tests suite by running:
npm run test:visual
Update the visual baseline via:
npm run test:visual:update
Failing tests (including diffs) can be found under
Releasing a new version of Stacks
Bump the version number
npm version [major | minor | patch]
Push the new tag
git push && git push --tags
- Visit https://github.com/StackExchange/Stacks/releases/new
- Choose your new version from the "Choose a tag" dropdown
- Click "Generate release notes"
- Cleanup and complete the release notes
- Prominently mention any breaking changes, if applicable
- Include a "What's Changed" section in the release notes
- Mention significant bug fixes
- Mention new features
- Mention significant under-the-hood changes that could impact consumers
production and push
git checkout production && git merge develop && git push
Push the updated docs site
Head to Netlify, navigate to the Stacks overview, click on "Production deploys", and select "Deploy site" from the "Trigger deploy" dropdown.
Bugs and feature requests
If you’d like to contribute to Stacks, please read through our contribution guidelines. Included are directions for opening issues, coding standards, and notes on development.
Code and documentation copyright 2017-2022 Stack Exchange, Inc and released under the MIT License.