Skip to content

Conversation

dvdherron
Copy link

Change into the src/dialog directory
Run npx http-server .
Open http://localhost:8080/

@dvdherron dvdherron changed the title add dialog demo files Add dialog demo Oct 7, 2025
Copy link
Collaborator

@jamesnw jamesnw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good overall. I few minor things, and I think I'd like a Miriam/Stacy review as well!

margin: unset;
text-align: center;
text-wrap: balance;
transition:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a slight movement transition from the bottom? I think from bottom: -20px to bottom: 0px makes it feel natural.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 8216c8a

<article>
<h1 data-heading="main"> Popping up with the <code>dialog</code> element</h1>
<section>
<h2 data-heading> Some Jumping Spiders
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do a play on JS = jumping spiders?

"Less JS (JavaScript), More JS (Jumping Spiders)"
"Vanilla JS (but the JS is Jumping spiders)"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about "Less JS, More Jumping Spiders"? 🕷️🕸️

@jamesnw jamesnw changed the base branch from main to container-queries October 15, 2025 17:25
@jamesnw jamesnw changed the base branch from container-queries to main October 15, 2025 17:25
Copy link

netlify bot commented Oct 15, 2025

Deploy Preview for oddbaseline ready!

Name Link
🔨 Latest commit 4fb757a
🔍 Latest deploy log https://app.netlify.com/projects/oddbaseline/deploys/68f26c398c93cc0008b3b97e
😎 Deploy Preview https://deploy-preview-4--oddbaseline.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

inherits: true;
}

dialog[open] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several distinct dialog & dialog[open] blocks, even though we're using nesting for other things. This could get moved into the main dialog style block and become &[open]?

transition:
opacity var(--transition-timing-slower) ease-in,
overlay var(--transition-timing-fast) linear,
display var(--transition-timing-fast) linear,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the out animation is jumpy because display animates so much faster than opacity. Consider making display one of the slowest, so it doesn't disappear before it's done fading?

}
}

dialog::backdrop {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it could be nested in the main block as &::backdrop?

Comment on lines 55 to 69
dialog[open]::backdrop {
--backdrop-opacity: 1;
--backdrop: linear-gradient(140deg,
var(--backdrop-gradient-start),
var(--backdrop-gradient-end));
--filter: blur(2px);
animation: show-gradient var(--transition-timing-slower) forwards;
}

@starting-style {
dialog[open]::backdrop {
--filter: none;
--backdrop-opacity: 0;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dialog[open]::backdrop {
--backdrop-opacity: 1;
--backdrop: linear-gradient(140deg,
var(--backdrop-gradient-start),
var(--backdrop-gradient-end));
--filter: blur(2px);
animation: show-gradient var(--transition-timing-slower) forwards;
}
@starting-style {
dialog[open]::backdrop {
--filter: none;
--backdrop-opacity: 0;
}
}
dialog[open]::backdrop {
--backdrop-opacity: 1;
--backdrop: linear-gradient(140deg,
var(--backdrop-gradient-start),
var(--backdrop-gradient-end));
--filter: blur(2px);
animation: show-gradient var(--transition-timing-slower) forwards;
@starting-style {
--filter: none;
--backdrop-opacity: 0;
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(just using nesting again)

Comment on lines 107 to 121
#privacy-popover:popover-open {
--popover-background: var(--color-highlight);
--popover-opacity: 1;
--popoover-inset: 0;
}

@starting-style {
#privacy-popover:popover-open {
--popover-background: transparent;
--popover-opacity: 0;
--popoover-inset: -20px;
}
}

#privacy-popover {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These also seem like they could use nesting?

@dvdherron
Copy link
Author

@mirisuzanne I think I addressed all of the nesting and animation issues, so this is ready for another quick look.

@dvdherron dvdherron requested a review from mirisuzanne October 17, 2025 13:35
Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvdherron looks great. There's a little linting that I think would clean up the code some, but isn't essential and we've never discussed any 'rules for nesting' or anything. To me it reads better if the nested stuff can be ordered:

  1. properties
  2. variants (like &[open])
  3. descendants (like [data-heading])

Since there's specificity differences at play, I think that can all be reordered safely without impacting the cascade at all.

@dvdherron
Copy link
Author

@mirisuzanne thanks. cleaned this up in 4fb757a

@dvdherron dvdherron requested a review from mirisuzanne October 17, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants