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

logical property naming #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
72 changes: 40 additions & 32 deletions src/components/Toast/Toast.module.css
Original file line number Diff line number Diff line change
@@ -1,61 +1,69 @@
.toast {
position: relative;
display: flex;
align-items: center;
gap: 16px;
border-radius: 16px;
color: black;
color-scheme: light;
background: white;
max-width: 100%;
width: 350px;
box-shadow: var(--shadow-elevation-medium);
position: relative;
display: flex;
align-items: center;
gap: 16px;
border-radius: 16px;
color: black;
color-scheme: light;
background: white;
max-inline-size: 100%;
width: 350px;
box-shadow: var(--shadow-elevation-medium);
}

.content {
flex: 1;
padding: 12px 0px;
font-weight: 600;
flex: 1;
padding: 12px 0px;
font-weight: 600;
}

.iconContainer {
flex-shrink: 0;
padding: 16px;
padding-right: 0px;
flex-shrink: 0;
padding: 16px;
padding-inline-end: 0px;
}

.iconContainer svg {
display: block;
display: block;
}

.closeButton {
flex-shrink: 0;
border: none;
background: transparent;
padding: 16px;
cursor: pointer;
flex-shrink: 0;
border: none;
background: transparent;
padding: 16px;
cursor: pointer;
}

.notice {
background: var(--color-notice-bg);
background: var(--color-notice-bg);
}

.notice .iconContainer {
color: var(--color-notice);
color: var(--color-notice);
}

.warning {
background: var(--color-warning-bg);
background: var(--color-warning-bg);
}

.warning .iconContainer {
color: var(--color-warning);
color: var(--color-warning);
}

.success {
background: var(--color-success-bg);
background: var(--color-success-bg);
}

.success .iconContainer {
color: var(--color-success);
color: var(--color-success);
}

.error {
background: var(--color-error-bg);
background: var(--color-error-bg);
}

.error .iconContainer {
color: var(--color-error);
}
color: var(--color-error);
}
128 changes: 65 additions & 63 deletions src/components/ToastPlayground/ToastPlayground.module.css
Original file line number Diff line number Diff line change
@@ -1,108 +1,110 @@
.wrapper {
padding: 64px 32px;
max-width: 800px;
margin: 0 auto;
padding: 64px 32px;
max-width: 800px;
margin: 0 auto;
}

.wrapper header {
position: relative;
display: flex;
align-items: flex-end;
margin-bottom: 64px;
min-height: 300px;
position: relative;
display: flex;
align-items: flex-end;
margin-bottom: 64px;
min-height: 300px;
}

.wrapper header h1 {
position: relative;
font-size: 4.25rem;
line-height: 1.1;
padding-bottom: 32px;
color: white;
/* prettier-ignore */
text-shadow:
0px 0px 10px hsl(250deg 40% 16% / 0.5),
0px 0px 20px hsl(250deg 40% 16% / 0.5),
0px 0px 40px hsl(250deg 40% 16% / 0.5);
position: relative;
font-size: 4.25rem;
line-height: 1.1;
padding-bottom: 32px;
color: white;
/* prettier-ignore */
text-shadow:
0px 0px 10px hsl(250deg 40% 16% / 0.5),
0px 0px 20px hsl(250deg 40% 16% / 0.5),
0px 0px 40px hsl(250deg 40% 16% / 0.5);
}

.wrapper header img {
position: absolute;
right: 0;
bottom: 0;
display: block;
width: 250px;
position: absolute;
right: 0;
bottom: 0;
display: block;
inline-size: 250px;
}

.controlsWrapper {
color-scheme: light;
outline: 2px dashed hsl(250deg 80% 80% / 0.6);
outline-offset: 4px;
border-radius: 4px;
background: white;
color: black;
padding: 16px;
margin-top: 32px;
color-scheme: light;
outline: 2px dashed hsl(250deg 80% 80% / 0.6);
outline-offset: 4px;
border-radius: 4px;
background: white;
color: black;
padding: 16px;
margin-top: 32px;
}

.row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 16px;
/*
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 16px;
/*
This is the height when a row contains a text input.
We specify it to prevent a layout shift when `dismiss-after`
is toggled on/off.
*/
min-height: 3rem;
min-block-size: 3rem;
}

.row:not(:last-of-type) {
padding-bottom: 16px;
border-bottom: 1px dotted hsl(250deg 80% 80% / 0.5);
margin-bottom: 16px;
padding-block-end: 16px;
border-block-end: 1px dotted hsl(250deg 80% 80% / 0.5);
margin-block-end: 16px;
}

.titleMessageWrapper {
padding-bottom: 16px;
border-bottom: 1px dotted hsl(250deg 80% 80% / 0.5);
margin-bottom: 16px;
padding-block-end: 16px;
border-block-end: 1px dotted hsl(250deg 80% 80% / 0.5);
margin-block-end: 16px;
}

.titleMessageRow {
display: flex;
align-items: flex-start;
flex-wrap: wrap;
gap: 16px;
display: flex;
align-items: flex-start;
flex-wrap: wrap;
gap: 16px;
}

.titleMessageRow:not(:last-of-type) {
margin-bottom: 16px;
margin-block-end: 16px;
}

.label {
flex-basis: 160px;
text-align: right;
font-weight: 700;
flex-basis: 160px;
text-align: right;
font-weight: 700;
}

.inputWrapper {
flex: 1;
flex: 1;
}

.radioWrapper {
display: flex;
flex-wrap: wrap;
gap: 4px 16px;
display: flex;
flex-wrap: wrap;
gap: 4px 16px;
}

.radioWrapper label {
display: flex;
align-items: center;
gap: 8px;
width: 100px;
display: flex;
align-items: center;
gap: 8px;
inline-size: 100px;
}

.messageInput {
display: block;
width: 100%;
height: 4rem;
}
display: block;
inline-size: 100%;
block-size: 4rem;
}
Loading