Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Overlay): Convert Overlay to CSS modules behind team feature flag #5310

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c269372
feat(Overlay): Convert Overlay to CSS modules behind team feature flag
francinelucca Nov 18, 2024
2b11e4c
Create nice-boxes-sell.md
francinelucca Nov 18, 2024
e9f3e29
fix(Overlay): types and format
francinelucca Nov 19, 2024
65c01bf
Merge branch 'francinelucca/4135-update-overlay-to-css-modules' of gi…
francinelucca Nov 19, 2024
4eb9e97
fix(Overlay): correct typos and add aria-label to dialog stories
francinelucca Nov 19, 2024
1ec3997
fix(Overlay): use sentence-case for aria-label in stories
francinelucca Nov 19, 2024
a1abf51
Update packages/react/src/Overlay/Overlay.module.css
francinelucca Nov 19, 2024
dceb73a
Merge branch 'main' into francinelucca/4135-update-overlay-to-css-mod…
francinelucca Nov 19, 2024
3dbdaa4
fix(Overlay): pull keyframes out of class definition
francinelucca Nov 19, 2024
c61f977
test(Overlay): skip story setup in e2e testing
francinelucca Nov 19, 2024
c71e160
Merge branch 'main' into francinelucca/4135-update-overlay-to-css-mod…
francinelucca Nov 25, 2024
a6c97b9
test(Overlay): re-add empty line
francinelucca Nov 25, 2024
4f5237e
test(vrt): update snapshots
francinelucca Nov 25, 2024
790c11f
Merge branch 'main' into francinelucca/4135-update-overlay-to-css-mod…
francinelucca Nov 26, 2024
7c8f8ea
fix(Overlay): separate concerns between BaseOverlay and Overlay
francinelucca Nov 27, 2024
aaa8a9c
Merge branch 'francinelucca/4135-update-overlay-to-css-modules' of gi…
francinelucca Nov 27, 2024
297e9f8
Merge branch 'main' into francinelucca/4135-update-overlay-to-css-mod…
francinelucca Nov 27, 2024
5779a79
test(vrt): update snapshots
francinelucca Nov 27, 2024
69a51a9
fix(Overlay): fix maxHeight maxWidth visual regression
francinelucca Nov 27, 2024
cbb1b3b
Merge branch 'francinelucca/4135-update-overlay-to-css-modules' of gi…
francinelucca Nov 27, 2024
4950b60
test(vrt): update snapshots
francinelucca Nov 27, 2024
7fa6584
Merge branch 'main' into francinelucca/4135-update-overlay-to-css-mod…
francinelucca Nov 27, 2024
34e6a66
Revert "test(vrt): update snapshots"
francinelucca Nov 27, 2024
6ac400b
Revert "test(vrt): update snapshots"
francinelucca Nov 27, 2024
3509dab
Revert "test(vrt): update snapshots"
francinelucca Nov 27, 2024
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
5 changes: 5 additions & 0 deletions .changeset/nice-boxes-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

feat(Overlay): Convert Overlay to CSS modules behind team feature flag
158 changes: 158 additions & 0 deletions packages/react/src/Overlay/Overlay.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
@keyframes overlay-appear {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

.Overlay {
position: absolute;
width: auto;
min-width: 192px;
height: auto;
overflow: hidden;
background-color: var(--overlay-bgColor);
border-radius: var(--borderRadius-large);
box-shadow: var(--shadow-floating-small);
animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);

&:focus {
outline: none;
}

@media (forced-colors: active) {
/* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */
outline: solid 1px transparent;
}

&:where([data-reflow-container='true']) {
max-width: calc(100vw - 2rem);
}

&:where([data-overflow-auto]) {
overflow: auto;
}

&:where([data-overflow-hidden]) {
overflow: hidden;
}

&:where([data-overflow-scroll]) {
overflow: scroll;
}

&:where([data-overflow-visible]) {
overflow: visible;
}

&:where([data-height-xsmall]) {
height: 192px;
}

&:where([data-height-small]) {
height: 256px;
}

&:where([data-height-medium]) {
height: 320px;
}

&:where([data-height-large]) {
height: 432px;
}

&:where([data-height-xlarge]) {
height: 600px;
}

&:where([data-height-auto]),
&:where([data-height-initial]) {
height: auto;
}

&:where([data-height-fit-content]) {
height: fit-content;
}

&:where([data-max-height-xsmall]) {
max-height: 192px;
}

&:where([data-max-height-small]) {
max-height: 256px;
}

&:where([data-max-height-medium]) {
max-height: 320px;
}

&:where([data-max-height-large]) {
max-height: 432px;
}

&:where([data-max-height-xlarge]) {
max-height: 600px;
}

&:where([data-max-height-fit-content]) {
max-height: fit-content;
}

&:where([data-width-small]) {
width: 256px;
}

&:where([data-width-medium]) {
width: 320px;
}

&:where([data-width-large]) {
/* stylelint-disable-next-line primer/responsive-widths */
width: 480px;
}

&:where([data-width-xlarge]) {
/* stylelint-disable-next-line primer/responsive-widths */
width: 640px;
}

&:where([data-width-xxlarge]) {
/* stylelint-disable-next-line primer/responsive-widths */
width: 960px;
}

&:where([data-width-auto]) {
width: auto;
}

&:where([data-max-width-small]) {
max-width: 256px;
}

&:where([data-max-width-medium]) {
max-width: 320px;
}

&:where([data-max-width-large]) {
max-width: 480px;
}

&:where([data-max-width-xlarge]) {
max-width: 640px;
}

&:where([data-max-width-xxlarge]) {
max-width: 960px;
}

&:where([data-visibility-visible]) {
visibility: visible;
}

&:where([data-visibility-hidden]) {
visibility: hidden;
}
}
Loading
Loading