feat: include the close icon styles in classless

This commit is contained in:
Asbjørn Ulsberg 2023-12-28 14:29:56 +01:00
parent 357ab1f1a0
commit 49d289b626
No known key found for this signature in database
GPG key ID: 34616339C3D5E883
10 changed files with 75 additions and 34 deletions

View file

@ -2108,6 +2108,11 @@ dialog article > footer {
dialog article > header > * {
margin-bottom: 0;
}
dialog article > header a[rel=prev] {
margin: 0;
margin-left: var(--pico-spacing);
float: right;
}
dialog article > footer {
text-align: right;
}
@ -2119,6 +2124,23 @@ dialog article > footer button:not(:first-of-type),
dialog article > footer [role=button]:not(:first-of-type) {
margin-left: calc(var(--pico-spacing) * 0.5);
}
dialog article a[rel=prev] {
display: block;
width: 1rem;
height: 1rem;
margin-top: calc(var(--pico-spacing) * -1);
margin-bottom: var(--pico-spacing);
margin-left: auto;
background-image: var(--pico-icon-close);
background-position: center;
background-size: auto 1rem;
background-repeat: no-repeat;
opacity: 0.5;
transition: opacity var(--pico-transition);
}
dialog article a[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
opacity: 1;
}
dialog:not([open]), dialog[open=false] {
display: none;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -2417,7 +2417,7 @@ dialog article > footer {
dialog article > header > * {
margin-bottom: 0;
}
dialog article > header .close {
dialog article > header .close, dialog article > header a[rel=prev] {
margin: 0;
margin-left: var(--pico-spacing);
float: right;
@ -2433,7 +2433,7 @@ dialog article > footer button:not(:first-of-type),
dialog article > footer [role=button]:not(:first-of-type) {
margin-left: calc(var(--pico-spacing) * 0.5);
}
dialog article .close {
dialog article .close, dialog article a[rel=prev] {
display: block;
width: 1rem;
height: 1rem;
@ -2447,7 +2447,7 @@ dialog article .close {
opacity: 0.5;
transition: opacity var(--pico-transition);
}
dialog article .close:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
dialog article .close:is([aria-current]:not([aria-current=false]), :hover, :active, :focus), dialog article a[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
opacity: 1;
}
dialog:not([open]), dialog[open=false] {

File diff suppressed because one or more lines are too long

View file

@ -2071,6 +2071,11 @@ dialog article > footer {
dialog article > header > * {
margin-bottom: 0;
}
dialog article > header a[rel=prev] {
margin: 0;
margin-left: var(--pico-spacing);
float: right;
}
dialog article > footer {
text-align: right;
}
@ -2082,6 +2087,23 @@ dialog article > footer button:not(:first-of-type),
dialog article > footer [role=button]:not(:first-of-type) {
margin-left: calc(var(--pico-spacing) * 0.5);
}
dialog article a[rel=prev] {
display: block;
width: 1rem;
height: 1rem;
margin-top: calc(var(--pico-spacing) * -1);
margin-bottom: var(--pico-spacing);
margin-left: auto;
background-image: var(--pico-icon-close);
background-position: center;
background-size: auto 1rem;
background-repeat: no-repeat;
opacity: 0.5;
transition: opacity var(--pico-transition);
}
dialog article a[rel=prev]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus) {
opacity: 1;
}
dialog:not([open]), dialog[open=false] {
display: none;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
css/pico.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -31,6 +31,7 @@
// Content
article {
$close-selector: if($enable-classes, ".close, a[rel='prev']", "a[rel='prev']");
width: 100%;
max-height: calc(100vh - var(#{$css-var-prefix}spacing) * 2);
margin: var(#{$css-var-prefix}spacing);
@ -59,14 +60,12 @@
margin-bottom: 0;
}
@if $enable-classes {
.close {
#{$close-selector} {
margin: 0;
margin-left: var(#{$css-var-prefix}spacing);
float: right;
}
}
}
> footer {
text-align: right;
@ -82,8 +81,7 @@
}
// Close icon
@if $enable-classes {
.close {
#{$close-selector} {
display: block;
width: 1rem;
height: 1rem;
@ -105,7 +103,6 @@
}
}
}
}
// Closed state
&:not([open]),