Style an open dialog
dialog:modal {
padding: 1.25rem;
border-radius: 12px;
border: none;
}
The :modal pseudo-class matches an element that is in a modal state, blocking interaction with the rest of the page—most commonly an open <dialog> shown with showModal().
dialog:modal {
border: none;
border-radius: 12px;
}dialog:modal {
padding: 1.25rem;
border-radius: 12px;
border: none;
}:modal is a CSS selector.
Supported in modern browsers.
Bottom line: Safe for modern sites. Keep readable defaults without the selector.
Continue with :popover-open.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful