Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stackoverflow/stacks

Package Overview
Dependencies
Maintainers
4
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackoverflow/stacks

Stack Overflow’s CSS and Design Pattern Library. Stacks is an atomic CSS library with classes and components for rapidly building Stack Overflow.

  • 2.0.0-rc.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-1.63%
Maintainers
4
Weekly downloads
 
Created
Source

Stacks

ci status npm version

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:

Product

  • Semantic and accessible component markup
  • Cross-browser compatible Less / CSS
  • An icon library

Email

  • Email templates & components

Stacks documentation can be found at https://stackoverflow.design/

Table of contents

Using Stacks

Using Stacks is outlined in our usage guidelines.

Building Stacks

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 setup label.

Format Stacks

Format the source code with prettier via running:

npm run format

Linting Stacks

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

Testing Stacks

Run all test suites by running:

npm test

Unit/Component Tests

Unit/Component tests are written with DOM Testing Library. Please follow the library's principles and documentation to write tests.

Stacks uses Web Test Runner and Playwright to run tests in a real browser context.

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

Prerequisites:

This Web Test Runner plugin is used to run visual regression tests. DOM Testing Library. Visual regression tests end with this suffix *.visual.test.ts.

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 screenshots/[browser]/failed/ folders.

Less Tests

This is an experimental suite to test the generation of CSS from Less files. Less tests end with this suffix *.less.test.ts.

Execute the less tests suite by running:

npm run test:less

Update the css snapshots via:

npm run test:less:update

Releasing a new version of Stacks

Stacks uses Semantic Versioning, is distributed via npm, and publishes release notes on Github. Follow the steps below to release a new version of Stacks.

Bump the version number

npm version [major | minor | patch]

Push the new tag

git push && git push --tags

Create release notes on Github

  1. Visit https://github.com/StackExchange/Stacks/releases/new
  2. Choose your new version from the "Choose a tag" dropdown
  3. Click "Generate release notes"
  4. 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

Ship your newly created version to npm

npm publish

Merge develop into 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

Have a bug or feature request? First search existing or closed issues to make sure the issue hasn’t been noted yet. If not, review our issue guidelines for submitting a bug report or feature request.

Contributing

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.

License

Code and documentation copyright 2017-2022 Stack Exchange, Inc and released under the MIT License.

FAQs

Package last updated on 29 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc