mirror of
https://github.com/picocss/pico.git
synced 2025-04-24 18:26:14 -04:00
feat: modal
Accept `button[rel=prev]` as modal closing item
This commit is contained in:
parent
175b101aa8
commit
ddd9cc4772
237 changed files with 715 additions and 473 deletions
|
@ -2027,7 +2027,7 @@ main {
|
|||
.pico dialog article > header > * {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.pico dialog article > header a[rel=prev] {
|
||||
.pico dialog article > header :is(a, button)[rel=prev] {
|
||||
margin: 0;
|
||||
margin-left: var(--pico-spacing);
|
||||
float: right;
|
||||
|
@ -2043,21 +2043,23 @@ main {
|
|||
.pico dialog article > footer [role=button]:not(:first-of-type) {
|
||||
margin-left: calc(var(--pico-spacing) * 0.5);
|
||||
}
|
||||
.pico dialog article a[rel=prev] {
|
||||
.pico dialog article :is(a, button)[rel=prev] {
|
||||
display: block;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin-top: calc(var(--pico-spacing) * -1);
|
||||
margin-bottom: var(--pico-spacing);
|
||||
margin-left: auto;
|
||||
border: none;
|
||||
background-image: var(--pico-icon-close);
|
||||
background-position: center;
|
||||
background-size: auto 1rem;
|
||||
background-repeat: no-repeat;
|
||||
background-color: transparent;
|
||||
opacity: 0.5;
|
||||
transition: opacity var(--pico-transition);
|
||||
}
|
||||
.pico dialog article a[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
.pico dialog article :is(a, button)[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
|
||||
opacity: 1;
|
||||
}
|
||||
.pico dialog:not([open]), .pico dialog[open=false] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue