{"id":13751522,"url":"https://github.com/StackExchange/Stacks","last_synced_at":"2025-05-09T18:31:40.682Z","repository":{"id":37484106,"uuid":"109884266","full_name":"StackExchange/Stacks","owner":"StackExchange","description":"Stack Overflow’s Design System","archived":false,"fork":false,"pushed_at":"2025-05-02T16:33:26.000Z","size":1049468,"stargazers_count":630,"open_issues_count":74,"forks_count":95,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2025-05-02T17:30:57.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://stackoverflow.design","language":"Less","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackExchange.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.MD","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-07T19:58:36.000Z","updated_at":"2025-04-28T03:54:36.000Z","dependencies_parsed_at":"2023-11-15T11:26:50.597Z","dependency_job_id":"e7c1f6a0-4815-41c5-b099-4a2d5911cc38","html_url":"https://github.com/StackExchange/Stacks","commit_stats":{"total_commits":4606,"total_committers":59,"mean_commits":78.0677966101695,"dds":0.4333478072079896,"last_synced_commit":"23b645bfdd6ecfe86c07de42ecf216dd64d578f7"},"previous_names":[],"tags_count":248,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackExchange%2FStacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackExchange","download_url":"https://codeload.github.com/StackExchange/Stacks/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253303024,"owners_count":21886873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T09:00:47.410Z","updated_at":"2025-05-09T18:31:35.581Z","avatar_url":"https://github.com/StackExchange.png","language":"Less","readme":"# Stacks\n\n[![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]\n\nStacks 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.\n\nOur documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.\n\nThe Stacks website documents:\n\n### Product\n- Semantic and accessible component markup\n- Cross-browser compatible Less / CSS\n- An [icon library](https://github.com/StackExchange/Stacks-Icons)\n\n### Email\n- Email templates \u0026 components\n\nStacks documentation can be found at https://stackoverflow.design/\n\n## Table of contents\n\n- [Using Stacks](#using-stacks)\n- [Migrating from v1 to v2](#migrating-from-v1-to-v2)\n- [Building Stacks](#building-stacks)\n- [Format Stacks](#format-stacks)\n- [Linting Stacks](#linting-stacks)\n- [Testing Stacks](#testing-stacks)\n- [Releasing Stacks](#releasing-a-new-version-of-stacks)\n- [Bugs and feature requests](#bugs-and-feature-requests)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Using Stacks\nUsing Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/develop/using-stacks).\n\n## Migrating from v1 to v2\n\nTo migrate from Stacks v1 to v2, see our [migration guide](/MIGRATION_GUIDE.md).\n\n## Building Stacks\nTo contribute to Stacks documentation or its CSS library, you’ll need to build Stacks locally. View our [building guidelines](https://stackoverflow.design/product/develop/building).\n\nHaving trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.\n\n## Format Stacks\n\nFormat the source code with prettier via running:\n```sh\nnpm run format\n```\n\n## Linting Stacks\n\nRun all lint suites by running:\n```sh\nnpm run lint\n```\n\nLint the styles (stylelint) by running:\n```sh\nnpm run lint:css\n```\nLint the typescript source code (eslint) via running:\n```sh\nnpm run lint:ts\n```\nLint the source code format (prettier) via running:\n```sh\nnpm run lint:format\n```\n\n## Testing Stacks\n\nRun all test suites by running:\n```sh\nnpm test\n```\n### Unit/Component Tests\n\nUnit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).\nPlease follow the library's principles and documentation to write tests.\n\nStacks uses [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) and [Playwright](https://modern-web.dev/docs/test-runner/browser-launchers/playwright/) to run tests in a real browser context.\n\nExecute the unit/component tests suite by running:\n```sh\nnpm run test:unit\n```\nor if you prefer watch mode run:\n```sh\nnpm run test:unit:watch\n```\n\n### Visual Regression Tests\n\n**Prerequisites:** \n- `git lfs` ([installation docs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage))\n- `docker` ([installation docs](https://docs.docker.com/engine/install/))\n- `pwsh` ([Installation docs](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3))\n- Run `git config diff.lfs.textconv cat` to make sure image diff works as expected ([More info](https://github.com/microsoft/vscode/issues/86611#issuecomment-875894108))\n\nThis [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests.\nVisual regression tests end with this suffix `*.visual.test.ts`.\n\nExecute the visual regression tests suite by running:\n```sh\nnpm run test:visual\n```\nAfter the first run, if there are failing snapshots, they end up overriding the baseline ones in the filesystem (e.g. `/screenshots/\u003cbrowser\u003e/baseline/\u003cname\u003e.png`). \nWe do this for easier comparison of the dif directly in vscode and to make sure only the failing snapshots get regenerated (see [this GH discussion](https://github.com/modernweb-dev/web/discussions/427#discussioncomment-3543771) that inspired the approach).\n\nWe also recommend to install [this vscode extension](https://marketplace.visualstudio.com/items?itemName=RayWiis.png-image-diff) for getting better diffs.\n\n### Less Tests\n\nThis is an experimental suite to test the generation of CSS from Less files. \nLess tests end with this suffix `*.less.test.ts`.\n\nExecute the less tests suite by running:\n```sh\nnpm run test:less\n```\n\nUpdate the css snapshots via:\n```sh\nnpm run test:less:update\n```\n\n## Releasing a new version of Stacks\nStacks uses [Semantic Versioning](https://semver.org/), is distributed via [npm](https://www.npmjs.com/package/@stackoverflow/stacks), and publishes [release notes on Github](https://github.com/StackExchange/Stacks/releases). Follow the steps below to release a new version of Stacks.\n\n### Bump the version number\n```sh\nnpm version [major | minor | patch]\n```\n\n### Push the new tag\n```sh\ngit push \u0026\u0026 git push --tags\n```\n\n### Create release notes [on Github](https://github.com/StackExchange/Stacks/releases/new)\n\n1. Visit https://github.com/StackExchange/Stacks/releases/new\n1. Choose your new version from the \"Choose a tag\" dropdown\n1. Click \"Generate release notes\"\n1. Cleanup and complete the release notes\n    - Prominently mention any breaking changes, if applicable\n    - Include a \"What's Changed\" section in the release notes\n    - Mention significant bug fixes\n    - Mention new features\n    - Mention significant under-the-hood changes that could impact consumers\n\n### Ship your newly created version to [npm](https://www.npmjs.com/package/@stackoverflow/stacks)\n```sh\nnpm publish\n```\n\n### Merge `develop` into `production` and push\n```sh\ngit checkout production \u0026\u0026 git merge develop \u0026\u0026 git push\n```\n\n### Push the updated docs site\nHead to [Netlify](https://app.netlify.com), navigate to the Stacks overview, click on \"Production deploys\", and select \"Deploy site\" from the \"Trigger deploy\" dropdown.\n\n## Bugs and feature requests\nHave 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](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).\n\n## Contributing\nIf you’d like to contribute to Stacks, please read through our [contribution guidelines](/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.\n\n## License\nCode and documentation copyright 2017-2024 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).\n\n[gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml\n[gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/workflow.yml/badge.svg?branch=develop\n[npm-url]: https://npmjs.org/package/@stackoverflow/stacks\n[npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg\n","funding_links":[],"categories":["General Purpose","Less"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2FStacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStackExchange%2FStacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStackExchange%2FStacks/lists"}