@stackoverflow/stacks 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +9 -9
- package/README.md +158 -180
- package/dist/css/stacks.css +18 -4
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.min.js +1 -1
- package/lib/atomic/border.less +139 -139
- package/lib/atomic/color.less +36 -36
- package/lib/atomic/flex.less +426 -426
- package/lib/atomic/gap.less +44 -44
- package/lib/atomic/grid.less +139 -139
- package/lib/atomic/misc.less +374 -374
- package/lib/atomic/spacing.less +98 -98
- package/lib/atomic/typography.less +266 -264
- package/lib/atomic/width-height.less +194 -194
- package/lib/base/body.less +44 -44
- package/lib/base/configuration-static.less +61 -61
- package/lib/base/fieldset.less +5 -5
- package/lib/base/icon.less +11 -11
- package/lib/base/internal.less +220 -220
- package/lib/base/reset-meyer.less +64 -64
- package/lib/base/reset-normalize.less +449 -449
- package/lib/base/reset.less +20 -20
- package/lib/components/activity-indicator/activity-indicator.less +53 -53
- package/lib/components/avatar/avatar.less +108 -108
- package/lib/components/award-bling/award-bling.less +31 -31
- package/lib/components/banner/banner.less +44 -44
- package/lib/components/banner/banner.ts +149 -149
- package/lib/components/block-link/block-link.less +82 -82
- package/lib/components/breadcrumbs/breadcrumbs.less +41 -41
- package/lib/components/button-group/button-group.less +82 -82
- package/lib/components/card/card.less +37 -37
- package/lib/components/check-control/check-control.less +17 -17
- package/lib/components/check-group/check-group.less +19 -19
- package/lib/components/checkbox_radio/checkbox_radio.less +159 -159
- package/lib/components/code-block/code-block.fixtures.ts +88 -88
- package/lib/components/code-block/code-block.less +116 -116
- package/lib/components/description/description.less +9 -9
- package/lib/components/empty-state/empty-state.less +16 -16
- package/lib/components/expandable/expandable.less +118 -118
- package/lib/components/input-fill/input-fill.less +35 -35
- package/lib/components/input-icon/input-icon.less +45 -45
- package/lib/components/input-message/input-message.less +49 -49
- package/lib/components/label/label.less +110 -110
- package/lib/components/link/link.less +7 -1
- package/lib/components/link-preview/link-preview.less +148 -148
- package/lib/components/menu/menu.less +41 -41
- package/lib/components/modal/modal.less +118 -118
- package/lib/components/modal/modal.ts +383 -383
- package/lib/components/navigation/navigation.less +136 -136
- package/lib/components/navigation/navigation.ts +128 -128
- package/lib/components/page-title/page-title.less +51 -51
- package/lib/components/popover/popover.less +159 -159
- package/lib/components/popover/popover.ts +651 -651
- package/lib/components/post-summary/post-summary.less +457 -457
- package/lib/components/progress-bar/progress-bar.less +291 -291
- package/lib/components/prose/prose.less +452 -452
- package/lib/components/select/select.less +138 -138
- package/lib/components/spinner/spinner.less +103 -103
- package/lib/components/table/table.ts +296 -296
- package/lib/components/table-container/table-container.less +4 -4
- package/lib/components/tag/tag.less +186 -186
- package/lib/components/toast/toast.less +35 -35
- package/lib/components/toast/toast.ts +357 -357
- package/lib/components/toggle-switch/toggle-switch.less +104 -104
- package/lib/components/topbar/topbar.less +553 -553
- package/lib/components/uploader/uploader.less +205 -205
- package/lib/components/user-card/user-card.less +129 -129
- package/lib/controllers.ts +33 -33
- package/lib/exports/color-mixins.less +283 -283
- package/lib/exports/constants-helpers.less +108 -108
- package/lib/exports/constants-type.less +155 -155
- package/lib/exports/exports.less +15 -15
- package/lib/exports/mixins.less +334 -333
- package/lib/exports/spacing-mixins.less +67 -67
- package/lib/index.ts +32 -32
- package/lib/input-utils.less +41 -41
- package/lib/stacks-dynamic.less +24 -24
- package/lib/stacks-static.less +93 -93
- package/lib/stacks.less +13 -13
- package/lib/test/assertions.ts +36 -36
- package/lib/test/less-test-utils.ts +28 -28
- package/lib/test/open-wc-testing-patch.d.ts +26 -26
- package/lib/tsconfig.build.json +4 -4
- package/lib/tsconfig.json +17 -17
- package/package.json +26 -22
package/LICENSE.MD
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright 2017-2024 Stack Exchange Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright 2017-2024 Stack Exchange Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,180 +1,158 @@
|
|
|
1
|
-
# Stacks
|
|
2
|
-
|
|
3
|
-
[![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]
|
|
4
|
-
|
|
5
|
-
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.
|
|
6
|
-
|
|
7
|
-
Our documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.
|
|
8
|
-
|
|
9
|
-
The Stacks website documents:
|
|
10
|
-
|
|
11
|
-
### Product
|
|
12
|
-
- Semantic and accessible component markup
|
|
13
|
-
- Cross-browser compatible Less / CSS
|
|
14
|
-
- An [icon library](https://github.com/StackExchange/Stacks-Icons)
|
|
15
|
-
|
|
16
|
-
### Email
|
|
17
|
-
- Email templates & components
|
|
18
|
-
|
|
19
|
-
Stacks documentation can be found at https://stackoverflow.design/
|
|
20
|
-
|
|
21
|
-
## Table of contents
|
|
22
|
-
|
|
23
|
-
- [Using Stacks](#using-stacks)
|
|
24
|
-
- [Migrating from v1 to v2](#migrating-from-v1-to-v2)
|
|
25
|
-
- [Building Stacks](#building-stacks)
|
|
26
|
-
- [Format Stacks](#format-stacks)
|
|
27
|
-
- [Linting Stacks](#linting-stacks)
|
|
28
|
-
- [Testing Stacks](#testing-stacks)
|
|
29
|
-
- [Releasing Stacks](#releasing-a-new-version-of-stacks)
|
|
30
|
-
- [Bugs and feature requests](#bugs-and-feature-requests)
|
|
31
|
-
- [Contributing](#contributing)
|
|
32
|
-
- [License](#license)
|
|
33
|
-
|
|
34
|
-
## Using Stacks
|
|
35
|
-
Using Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/develop/using-stacks).
|
|
36
|
-
|
|
37
|
-
## Migrating from v1 to v2
|
|
38
|
-
|
|
39
|
-
To migrate from Stacks v1 to v2, see our [migration guide](/MIGRATION_GUIDE.md).
|
|
40
|
-
|
|
41
|
-
## Building Stacks
|
|
42
|
-
To 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).
|
|
43
|
-
|
|
44
|
-
Having trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.
|
|
45
|
-
|
|
46
|
-
## Format Stacks
|
|
47
|
-
|
|
48
|
-
Format the source code with prettier via running:
|
|
49
|
-
```sh
|
|
50
|
-
npm run format
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Linting Stacks
|
|
54
|
-
|
|
55
|
-
Run all lint suites by running:
|
|
56
|
-
```sh
|
|
57
|
-
npm run lint
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Lint the styles (stylelint) by running:
|
|
61
|
-
```sh
|
|
62
|
-
npm run lint:css
|
|
63
|
-
```
|
|
64
|
-
Lint the typescript source code (eslint) via running:
|
|
65
|
-
```sh
|
|
66
|
-
npm run lint:ts
|
|
67
|
-
```
|
|
68
|
-
Lint the source code format (prettier) via running:
|
|
69
|
-
```sh
|
|
70
|
-
npm run lint:format
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Testing Stacks
|
|
74
|
-
|
|
75
|
-
Run all test suites by running:
|
|
76
|
-
```sh
|
|
77
|
-
npm test
|
|
78
|
-
```
|
|
79
|
-
### Unit/Component Tests
|
|
80
|
-
|
|
81
|
-
Unit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
|
|
82
|
-
Please follow the library's principles and documentation to write tests.
|
|
83
|
-
|
|
84
|
-
Stacks 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.
|
|
85
|
-
|
|
86
|
-
Execute the unit/component tests suite by running:
|
|
87
|
-
```sh
|
|
88
|
-
npm run test:unit
|
|
89
|
-
```
|
|
90
|
-
or if you prefer watch mode run:
|
|
91
|
-
```sh
|
|
92
|
-
npm run test:unit:watch
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Visual Regression Tests
|
|
96
|
-
|
|
97
|
-
**Prerequisites:**
|
|
98
|
-
- `git lfs` ([installation docs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage))
|
|
99
|
-
- `docker` ([installation docs](https://docs.docker.com/engine/install/))
|
|
100
|
-
- `pwsh` ([Installation docs](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3))
|
|
101
|
-
- 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))
|
|
102
|
-
|
|
103
|
-
This [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests.
|
|
104
|
-
Visual regression tests end with this suffix `*.visual.test.ts`.
|
|
105
|
-
|
|
106
|
-
Execute the visual regression tests suite by running:
|
|
107
|
-
```sh
|
|
108
|
-
npm run test:visual
|
|
109
|
-
```
|
|
110
|
-
After the first run, if there are failing snapshots, they end up overriding the baseline ones in the filesystem (e.g. `/screenshots/<browser>/baseline/<name>.png`).
|
|
111
|
-
We 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).
|
|
112
|
-
|
|
113
|
-
We also recommend to install [this vscode extension](https://marketplace.visualstudio.com/items?itemName=RayWiis.png-image-diff) for getting better diffs.
|
|
114
|
-
|
|
115
|
-
### Less Tests
|
|
116
|
-
|
|
117
|
-
This is an experimental suite to test the generation of CSS from Less files.
|
|
118
|
-
Less tests end with this suffix `*.less.test.ts`.
|
|
119
|
-
|
|
120
|
-
Execute the less tests suite by running:
|
|
121
|
-
```sh
|
|
122
|
-
npm run test:less
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Update the css snapshots via:
|
|
126
|
-
```sh
|
|
127
|
-
npm run test:less:update
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Releasing a new version of Stacks
|
|
131
|
-
Stacks 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).
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
npm
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
### Merge `develop` into `production` and push
|
|
161
|
-
```sh
|
|
162
|
-
git checkout production && git merge develop && git push
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Push the updated docs site
|
|
166
|
-
Head to [Netlify](https://app.netlify.com), navigate to the Stacks overview, click on "Production deploys", and select "Deploy site" from the "Trigger deploy" dropdown.
|
|
167
|
-
|
|
168
|
-
## Bugs and feature requests
|
|
169
|
-
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](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).
|
|
170
|
-
|
|
171
|
-
## Contributing
|
|
172
|
-
If 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.
|
|
173
|
-
|
|
174
|
-
## License
|
|
175
|
-
Code and documentation copyright 2017-2024 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).
|
|
176
|
-
|
|
177
|
-
[gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml
|
|
178
|
-
[gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/workflow.yml/badge.svg?branch=develop
|
|
179
|
-
[npm-url]: https://npmjs.org/package/@stackoverflow/stacks
|
|
180
|
-
[npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg
|
|
1
|
+
# Stacks
|
|
2
|
+
|
|
3
|
+
[![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
Our documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.
|
|
8
|
+
|
|
9
|
+
The Stacks website documents:
|
|
10
|
+
|
|
11
|
+
### Product
|
|
12
|
+
- Semantic and accessible component markup
|
|
13
|
+
- Cross-browser compatible Less / CSS
|
|
14
|
+
- An [icon library](https://github.com/StackExchange/Stacks-Icons)
|
|
15
|
+
|
|
16
|
+
### Email
|
|
17
|
+
- Email templates & components
|
|
18
|
+
|
|
19
|
+
Stacks documentation can be found at https://stackoverflow.design/
|
|
20
|
+
|
|
21
|
+
## Table of contents
|
|
22
|
+
|
|
23
|
+
- [Using Stacks](#using-stacks)
|
|
24
|
+
- [Migrating from v1 to v2](#migrating-from-v1-to-v2)
|
|
25
|
+
- [Building Stacks](#building-stacks)
|
|
26
|
+
- [Format Stacks](#format-stacks)
|
|
27
|
+
- [Linting Stacks](#linting-stacks)
|
|
28
|
+
- [Testing Stacks](#testing-stacks)
|
|
29
|
+
- [Releasing Stacks](#releasing-a-new-version-of-stacks)
|
|
30
|
+
- [Bugs and feature requests](#bugs-and-feature-requests)
|
|
31
|
+
- [Contributing](#contributing)
|
|
32
|
+
- [License](#license)
|
|
33
|
+
|
|
34
|
+
## Using Stacks
|
|
35
|
+
Using Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/develop/using-stacks).
|
|
36
|
+
|
|
37
|
+
## Migrating from v1 to v2
|
|
38
|
+
|
|
39
|
+
To migrate from Stacks v1 to v2, see our [migration guide](/MIGRATION_GUIDE.md).
|
|
40
|
+
|
|
41
|
+
## Building Stacks
|
|
42
|
+
To 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).
|
|
43
|
+
|
|
44
|
+
Having trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.
|
|
45
|
+
|
|
46
|
+
## Format Stacks
|
|
47
|
+
|
|
48
|
+
Format the source code with prettier via running:
|
|
49
|
+
```sh
|
|
50
|
+
npm run format
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Linting Stacks
|
|
54
|
+
|
|
55
|
+
Run all lint suites by running:
|
|
56
|
+
```sh
|
|
57
|
+
npm run lint
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Lint the styles (stylelint) by running:
|
|
61
|
+
```sh
|
|
62
|
+
npm run lint:css
|
|
63
|
+
```
|
|
64
|
+
Lint the typescript source code (eslint) via running:
|
|
65
|
+
```sh
|
|
66
|
+
npm run lint:ts
|
|
67
|
+
```
|
|
68
|
+
Lint the source code format (prettier) via running:
|
|
69
|
+
```sh
|
|
70
|
+
npm run lint:format
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Testing Stacks
|
|
74
|
+
|
|
75
|
+
Run all test suites by running:
|
|
76
|
+
```sh
|
|
77
|
+
npm test
|
|
78
|
+
```
|
|
79
|
+
### Unit/Component Tests
|
|
80
|
+
|
|
81
|
+
Unit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
|
|
82
|
+
Please follow the library's principles and documentation to write tests.
|
|
83
|
+
|
|
84
|
+
Stacks 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.
|
|
85
|
+
|
|
86
|
+
Execute the unit/component tests suite by running:
|
|
87
|
+
```sh
|
|
88
|
+
npm run test:unit
|
|
89
|
+
```
|
|
90
|
+
or if you prefer watch mode run:
|
|
91
|
+
```sh
|
|
92
|
+
npm run test:unit:watch
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Visual Regression Tests
|
|
96
|
+
|
|
97
|
+
**Prerequisites:**
|
|
98
|
+
- `git lfs` ([installation docs](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage))
|
|
99
|
+
- `docker` ([installation docs](https://docs.docker.com/engine/install/))
|
|
100
|
+
- `pwsh` ([Installation docs](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.3))
|
|
101
|
+
- 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))
|
|
102
|
+
|
|
103
|
+
This [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests.
|
|
104
|
+
Visual regression tests end with this suffix `*.visual.test.ts`.
|
|
105
|
+
|
|
106
|
+
Execute the visual regression tests suite by running:
|
|
107
|
+
```sh
|
|
108
|
+
npm run test:visual
|
|
109
|
+
```
|
|
110
|
+
After the first run, if there are failing snapshots, they end up overriding the baseline ones in the filesystem (e.g. `/screenshots/<browser>/baseline/<name>.png`).
|
|
111
|
+
We 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).
|
|
112
|
+
|
|
113
|
+
We also recommend to install [this vscode extension](https://marketplace.visualstudio.com/items?itemName=RayWiis.png-image-diff) for getting better diffs.
|
|
114
|
+
|
|
115
|
+
### Less Tests
|
|
116
|
+
|
|
117
|
+
This is an experimental suite to test the generation of CSS from Less files.
|
|
118
|
+
Less tests end with this suffix `*.less.test.ts`.
|
|
119
|
+
|
|
120
|
+
Execute the less tests suite by running:
|
|
121
|
+
```sh
|
|
122
|
+
npm run test:less
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Update the css snapshots via:
|
|
126
|
+
```sh
|
|
127
|
+
npm run test:less:update
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Releasing a new version of Stacks
|
|
131
|
+
Stacks 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).
|
|
132
|
+
|
|
133
|
+
We use [changesets](https://github.com/changesets/changesets) to automatize the steps necessary to publish to NPM, create GH releases and a changelog.
|
|
134
|
+
|
|
135
|
+
- Every time you do work that requires a new release to be published, [add a changesets entry](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) by running `npx chageset` and follow the instrcutions on screen. (changes that do not require a new release - e.g. changing a test file - don't need a changeset).
|
|
136
|
+
- When opening a PR without a corresponding changeset the [changesets-bot](https://github.com/apps/changeset-bot) will remind you to do so. It generally makes sense to have one changeset for PR (if the PR changes do not require a new release to be published the bot message can be safely ignored)
|
|
137
|
+
- The [release github workflow](.github/workflows/release.yml) continuosly check if there are new pending changesets in the main branch, if there are it creates a GH PR (`chore(release)` [see example](https://github.com/StackExchange/apca-check/pull/2)) and continue updating it as more changesets are potentially pushed/merged to the main branch.
|
|
138
|
+
- When we are ready to cut a release we need to simply merge the `chore(release)` PR back to main and the release github workflow will take care of publishing the changes to NPM and create a GH release for us. The `chore(release)` PR also give us an opportunity to adjust the automatically generated changelog when necessary (the entry in the changelog file is also what will end up in the GH release notes).
|
|
139
|
+
|
|
140
|
+
_The release github workflow only run if the CI workflow (running linter, formatter and tests) is successful: CI is blocking accidental releases_.
|
|
141
|
+
|
|
142
|
+
_Despite using changesets to communicate the intent of creating releases in a more explicit way, we still follow [conventional commits standards](https://www.conventionalcommits.org/en/v1.0.0/) for keeping our git history easily parseable by the human eye._
|
|
143
|
+
|
|
144
|
+
Successful releases trigger automatically a new deployment to stackoverflow.design by merging the `develop` branch into the `production` branch.
|
|
145
|
+
|
|
146
|
+
## Bugs and feature requests
|
|
147
|
+
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](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).
|
|
148
|
+
|
|
149
|
+
## Contributing
|
|
150
|
+
If 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.
|
|
151
|
+
|
|
152
|
+
## License
|
|
153
|
+
Code and documentation copyright 2017-2024 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).
|
|
154
|
+
|
|
155
|
+
[gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml
|
|
156
|
+
[gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/workflow.yml/badge.svg?branch=develop
|
|
157
|
+
[npm-url]: https://npmjs.org/package/@stackoverflow/stacks
|
|
158
|
+
[npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg
|
package/dist/css/stacks.css
CHANGED
|
@@ -1442,6 +1442,12 @@ p .s-btn.s-btn__link {
|
|
|
1442
1442
|
.s-btn.s-btn__link:hover {
|
|
1443
1443
|
--_li-fc: var(--_li-fc-hover);
|
|
1444
1444
|
}
|
|
1445
|
+
.s-btn.s-btn__link:visited {
|
|
1446
|
+
color: var(--_li-fc-visited);
|
|
1447
|
+
}
|
|
1448
|
+
.s-btn.s-btn__link:hover:visited {
|
|
1449
|
+
color: var(--_li-fc-hover-visited);
|
|
1450
|
+
}
|
|
1445
1451
|
.s-btn.s-btn__unset {
|
|
1446
1452
|
outline: initial;
|
|
1447
1453
|
}
|
|
@@ -2622,23 +2628,19 @@ body.theme-highcontrast .s-label--status {
|
|
|
2622
2628
|
text-decoration: none !important;
|
|
2623
2629
|
}
|
|
2624
2630
|
a:not([class*="s-"]):not(.post-tag):not(.badge):not(.badge-tag):active,
|
|
2625
|
-
a.s-link:active,
|
|
2626
2631
|
a.s-sidebarwidget--action:active,
|
|
2627
2632
|
a.s-user-card--link:active,
|
|
2628
2633
|
a:not([class*="s-"]):not(.post-tag):not(.badge):not(.badge-tag):hover,
|
|
2629
|
-
a.s-link:hover,
|
|
2630
2634
|
a.s-sidebarwidget--action:hover,
|
|
2631
2635
|
a.s-user-card--link:hover {
|
|
2632
2636
|
color: var(--_an-a-fc-hover, var(--_li-fc-hover));
|
|
2633
2637
|
}
|
|
2634
2638
|
a:not([class*="s-"]):not(.post-tag):not(.badge):not(.badge-tag):visited,
|
|
2635
|
-
a.s-link:visited,
|
|
2636
2639
|
a.s-sidebarwidget--action:visited,
|
|
2637
2640
|
a.s-user-card--link:visited {
|
|
2638
2641
|
color: var(--_an-a-fc-visited, var(--_li-fc-visited));
|
|
2639
2642
|
}
|
|
2640
2643
|
a:not([class*="s-"]):not(.post-tag):not(.badge):not(.badge-tag):hover:visited,
|
|
2641
|
-
a.s-link:hover:visited,
|
|
2642
2644
|
a.s-sidebarwidget--action:hover:visited,
|
|
2643
2645
|
a.s-user-card--link:hover:visited {
|
|
2644
2646
|
color: var(--_an-a-fc-hover-visited, var(--_li-fc-hover-visited));
|
|
@@ -2747,6 +2749,12 @@ p .s-link {
|
|
|
2747
2749
|
.s-link:hover {
|
|
2748
2750
|
--_li-fc: var(--_li-fc-hover);
|
|
2749
2751
|
}
|
|
2752
|
+
.s-link:visited {
|
|
2753
|
+
color: var(--_li-fc-visited);
|
|
2754
|
+
}
|
|
2755
|
+
.s-link:hover:visited {
|
|
2756
|
+
color: var(--_li-fc-hover-visited);
|
|
2757
|
+
}
|
|
2750
2758
|
.s-link-preview {
|
|
2751
2759
|
--_lp-details-fc: var(--black-400);
|
|
2752
2760
|
--_lp-details-mt: var(--su2);
|
|
@@ -3896,6 +3904,7 @@ body.theme-highcontrast .s-post-summary .s-post-summary--answer:before {
|
|
|
3896
3904
|
opacity: var(--_ps-o);
|
|
3897
3905
|
}
|
|
3898
3906
|
.s-post-summary .s-post-summary--content-excerpt {
|
|
3907
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
3899
3908
|
word-break: break-word !important;
|
|
3900
3909
|
overflow-wrap: break-word !important;
|
|
3901
3910
|
-webkit-hyphens: auto !important;
|
|
@@ -3942,6 +3951,7 @@ body.theme-highcontrast .s-post-summary .s-post-summary--answer:before {
|
|
|
3942
3951
|
position: absolute;
|
|
3943
3952
|
}
|
|
3944
3953
|
.s-post-summary .s-post-summary--content-title {
|
|
3954
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
3945
3955
|
word-break: break-word !important;
|
|
3946
3956
|
overflow-wrap: break-word !important;
|
|
3947
3957
|
-webkit-hyphens: auto !important;
|
|
@@ -3957,6 +3967,7 @@ body.theme-highcontrast .s-post-summary .s-post-summary--answer:before {
|
|
|
3957
3967
|
padding-right: var(--su24);
|
|
3958
3968
|
}
|
|
3959
3969
|
.s-post-summary .s-post-summary--content-title a {
|
|
3970
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
3960
3971
|
word-break: break-word !important;
|
|
3961
3972
|
overflow-wrap: break-word !important;
|
|
3962
3973
|
-webkit-hyphens: auto !important;
|
|
@@ -7494,6 +7505,8 @@ body.theme-highcontrast:not(.theme-dark) .theme-dark__forced {
|
|
|
7494
7505
|
}
|
|
7495
7506
|
}
|
|
7496
7507
|
/* stylelint-disable indentation */
|
|
7508
|
+
/* stylelint-disable at-rule-descriptor-value-no-unknown */
|
|
7509
|
+
/* stylelint-enable at-rule-descriptor-value-no-unknown */
|
|
7497
7510
|
/**
|
|
7498
7511
|
* Focus styles for the given context.
|
|
7499
7512
|
*
|
|
@@ -15542,6 +15555,7 @@ p {
|
|
|
15542
15555
|
hyphens: unset !important;
|
|
15543
15556
|
}
|
|
15544
15557
|
.break-word {
|
|
15558
|
+
/* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */
|
|
15545
15559
|
word-break: break-word !important;
|
|
15546
15560
|
overflow-wrap: break-word !important;
|
|
15547
15561
|
-webkit-hyphens: auto !important;
|