Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d983fa8
Update pagination component in classic and svelte
ttaylor-stack Nov 4, 2025
06b7b05
Update site-navigation.json
ttaylor-stack Nov 4, 2025
2c1d206
update html file
ttaylor-stack Nov 4, 2025
50d035c
Update migration guide
ttaylor-stack Nov 4, 2025
99abdcf
add changeset
ttaylor-stack Nov 4, 2025
47cf2a4
Update to fix accessibility issues
ttaylor-stack Nov 6, 2025
b665f16
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 6, 2025
7734583
Update test
ttaylor-stack Nov 6, 2025
05f1236
Merge branch 'spark-73/update-pagination-component' of https://github…
ttaylor-stack Nov 6, 2025
57fc4af
Add description for pagination component in docs
ttaylor-stack Nov 6, 2025
333011c
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 7, 2025
9f7180d
Simplify pagination styles
dancormier Nov 10, 2025
bc9b4c1
Update assertions.ts
ttaylor-stack Nov 11, 2025
c328e9f
revert changes to assertions.ts
ttaylor-stack Nov 11, 2025
d8621ce
update a11y to test against box shadow instead of bg color
ttaylor-stack Nov 12, 2025
1730ff5
format
ttaylor-stack Nov 12, 2025
4f2a0be
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 12, 2025
be25e6e
update visual tests
ttaylor-stack Nov 12, 2025
6f6844b
Merge branch 'spark-73/update-pagination-component' of https://github…
ttaylor-stack Nov 12, 2025
69da13c
remove new assertion function
ttaylor-stack Nov 12, 2025
32d551a
Update based on comments
ttaylor-stack Nov 13, 2025
d2b545e
update visual regression tests
ttaylor-stack Nov 13, 2025
c697266
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 13, 2025
517b541
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 14, 2025
befbd3a
Update MIGRATION_GUIDE.md
ttaylor-stack Nov 17, 2025
3687c0d
Update packages/stacks-classic/lib/components/pagination/pagination.less
ttaylor-stack Nov 18, 2025
93a3314
update based on comments
ttaylor-stack Nov 18, 2025
d1c9bd0
Merge branch 'spark-73/update-pagination-component' of https://github…
ttaylor-stack Nov 18, 2025
bc9e0c9
Update based on comments
ttaylor-stack Nov 18, 2025
0c0e3ae
Merge branch 'beta' into spark-73/update-pagination-component
ttaylor-stack Nov 18, 2025
c7947bd
Update PaginationItem.svelte
ttaylor-stack Nov 18, 2025
85f0d20
fix tests
ttaylor-stack Nov 18, 2025
fce8dd8
remove border shadow, use :before instead
ttaylor-stack Nov 18, 2025
02c6935
Minor docs fixes
dancormier Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/sharp-heads-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@stackoverflow/stacks": minor
"@stackoverflow/stacks-svelte": minor
---

Update pagination component to match new SHINE design system

BREAKING CHANGES
The next button now uses an ArrowRight and ArrowLeft icon instead of text. To apply the new styling, add the `item__nav` class to pagination items that represent the "Next" button.
3 changes: 3 additions & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
- The Award Bling component has been renamed to Bling.
- Bling no longer accepts children elements besides those for screen readers. Please include any visually represented strings (such as counts) as siblings to the bling component.

#### Pagination
- The next and previous button now uses an `ArrowRight` and `ArrowLeft` icon instead of text. To apply the new styling, use the class `.s-pagination--item__nav`. Since these buttons use icons to represent their behavior, make sure to include descriptive text for screen readers.

#### Popover
- The new popovers no longer include an arrow element. The `s-popover--arrow` css class has been removed, and any markup using it (e.g. `<div class="s-popover--arrow"></div>`) should be deleted from the codebases as part of the migration.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { runA11yTests } from "../../test/a11y-test-utils";
import { WCAGNonTextContrast } from "../../test/assertions";
import "../../index";

describe("pagination", () => {
Expand Down Expand Up @@ -33,6 +32,5 @@ describe("pagination", () => {
`,
},
tag: "nav",
additionalAssertions: [WCAGNonTextContrast],
});
});
87 changes: 44 additions & 43 deletions packages/stacks-classic/lib/components/pagination/pagination.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,71 @@
}

& &--item {
--_pa-item-bg: transparent;
--_pa-item-bc: var(--bc-darker);
--_pa-item-fc: var(--fc-medium);
--_pa-item-bg-focus: var(--black-400);
--_pa-item-fc-focus: var(--white);
--_pa-item-bg-hover: var(--black-225);
--_pa-item-bc-hover: var(--bc-darker);
--_pa-item-fc-hover: var(--fc-dark);

// CONTEXTUAL STYLES
.highcontrast-mode({ text-decoration: none; });
--_pa-item-bg: unset;
--_pa-item-br: unset;
--_pa-item-fc: var(--black-400);
--_pa-item-p: var(--su-static4);

// MODIFIERS
&.is-selected {
--_pa-item-bg: var(--theme-primary);
--_pa-item-bc: transparent;
--_pa-item-fc: var(--white);
--_pa-item-bg-focus: var(--theme-primary-400);
}
&.s-pagination--item__clear {
--_pa-item-bg: transparent;
--_pa-item-bc: transparent;
--_pa-item-fc: inherit;
--_pa-item-fc: var(--black-600);

&:not(:hover):not(:focus-visible):before {
background-color: var(--black-600);
content: "";
height: var(--su-static2);
left: 0;
position: absolute;
right: 0;
top: 100%;
}
}
// override hover styles to match base styles
&.is-selected,
&.s-pagination--item__clear {
--_pa-item-bc-hover: var(--_pa-item-bc);
--_pa-item-bg-hover: var(--_pa-item-bg);
--_pa-item-fc-hover: var(--_pa-item-fc);
&.s-pagination--item__nav {
--_pa-item-bg: var(--black-150);
--_pa-item-br: var(--br-circle);
--_pa-item-fc: var(--black-600);
--_pa-item-p: var(--su-static6);

aspect-ratio: 1 / 1;

&:hover {
--_pa-item-bg: var(--black-200);
}
}

// INTERACTION
&:hover {
background-color: var(--_pa-item-bg-hover);
border-color: var(--_pa-item-bc-hover);
color: var(--_pa-item-fc-hover);
&[href]:hover:not(&__nav) {
--_pa-item-bg: var(--black-150);
--_pa-item-br: var(--br-pill);
--_pa-item-fc: var(--black-600);
}

&:focus-visible {
.focus-styles(true, true);
--_pa-item-bg: var(--black-150);
--_pa-item-fc: var(--black-600);
.focus-styles(false, true);
}

&:focus-visible,
&:focus-visible:not(&__nav),
&.focus-inset-bordered {
background-color: var(--_pa-item-bg-focus);
color: var(--_pa-item-fc-focus);
--_pa-item-br: var(--br-md);
}

background-color: var(--_pa-item-bg);
border: 1px solid var(--_pa-item-bc);
border-radius: var(--_pa-item-br);
color: var(--_pa-item-fc);
padding: var(--_pa-item-p);

border-radius: var(--br-md);
display: inline-block;
font-size: var(--fs-body1);
line-height: var(--lh-xl);
padding: 0 var(--su8);
display: inline-flex;
align-items: center;
justify-content: center;
margin: var(--su-static1);
position: relative;
}

&,
ul {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--su4);
gap: var(--su2);
}
}
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Loading