mirror of
https://github.com/picocss/pico.git
synced 2025-04-20 08:45:06 -04:00
feat: include the close icon styles in classless
This commit is contained in:
parent
a88ad874c5
commit
d85d2f177c
11 changed files with 63 additions and 30 deletions
|
@ -1831,7 +1831,7 @@ dialog article > header,
|
||||||
dialog article > footer {
|
dialog article > footer {
|
||||||
padding: calc(var(--block-spacing-vertical) * 0.5) var(--block-spacing-horizontal);
|
padding: calc(var(--block-spacing-vertical) * 0.5) var(--block-spacing-horizontal);
|
||||||
}
|
}
|
||||||
dialog article > header .close {
|
dialog article > header a[rel=prev] {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: var(--spacing);
|
margin-left: var(--spacing);
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -1848,6 +1848,23 @@ dialog article > footer [role=button]:not(:first-of-type) {
|
||||||
dialog article p:last-of-type {
|
dialog article p:last-of-type {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
dialog article a[rel=prev] {
|
||||||
|
display: block;
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
margin-top: calc(var(--block-spacing-vertical) * -0.5);
|
||||||
|
margin-bottom: var(--typography-spacing-vertical);
|
||||||
|
margin-left: auto;
|
||||||
|
background-image: var(--icon-close);
|
||||||
|
background-position: center;
|
||||||
|
background-size: auto 1rem;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
opacity: 0.5;
|
||||||
|
transition: opacity var(--transition);
|
||||||
|
}
|
||||||
|
dialog article a[rel=prev]:is([aria-current], :hover, :active, :focus) {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
dialog:not([open]), dialog[open=false] {
|
dialog:not([open]), dialog[open=false] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
css/pico.classless.min.css
vendored
2
css/pico.classless.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1801,7 +1801,7 @@ dialog article > header,
|
||||||
dialog article > footer {
|
dialog article > footer {
|
||||||
padding: calc(var(--block-spacing-vertical) * 0.5) var(--block-spacing-horizontal);
|
padding: calc(var(--block-spacing-vertical) * 0.5) var(--block-spacing-horizontal);
|
||||||
}
|
}
|
||||||
dialog article > header .close {
|
dialog article > header a[rel=prev] {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: var(--spacing);
|
margin-left: var(--spacing);
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -1818,6 +1818,23 @@ dialog article > footer [role=button]:not(:first-of-type) {
|
||||||
dialog article p:last-of-type {
|
dialog article p:last-of-type {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
dialog article a[rel=prev] {
|
||||||
|
display: block;
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
margin-top: calc(var(--block-spacing-vertical) * -0.5);
|
||||||
|
margin-bottom: var(--typography-spacing-vertical);
|
||||||
|
margin-left: auto;
|
||||||
|
background-image: var(--icon-close);
|
||||||
|
background-position: center;
|
||||||
|
background-size: auto 1rem;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
opacity: 0.5;
|
||||||
|
transition: opacity var(--transition);
|
||||||
|
}
|
||||||
|
dialog article a[rel=prev]:is([aria-current], :hover, :active, :focus) {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
dialog:not([open]), dialog[open=false] {
|
dialog:not([open]), dialog[open=false] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
css/pico.fluid.classless.min.css
vendored
2
css/pico.fluid.classless.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,6 +28,7 @@ dialog {
|
||||||
|
|
||||||
// Content
|
// Content
|
||||||
article {
|
article {
|
||||||
|
$close-selector: if($enable-classes, ".close", "a[rel='prev']");
|
||||||
max-height: calc(100vh - var(--spacing) * 2);
|
max-height: calc(100vh - var(--spacing) * 2);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
> header {
|
> header {
|
||||||
.close {
|
#{$close-selector} {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-left: var(--spacing);
|
margin-left: var(--spacing);
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -76,27 +77,25 @@ dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close icon
|
// Close icon
|
||||||
@if $enable-classes {
|
#{$close-selector} {
|
||||||
.close {
|
display: block;
|
||||||
display: block;
|
width: 1rem;
|
||||||
width: 1rem;
|
height: 1rem;
|
||||||
height: 1rem;
|
margin-top: calc(var(--block-spacing-vertical) * -0.5);
|
||||||
margin-top: calc(var(--block-spacing-vertical) * -0.5);
|
margin-bottom: var(--typography-spacing-vertical);
|
||||||
margin-bottom: var(--typography-spacing-vertical);
|
margin-left: auto;
|
||||||
margin-left: auto;
|
background-image: var(--icon-close);
|
||||||
background-image: var(--icon-close);
|
background-position: center;
|
||||||
background-position: center;
|
background-size: auto 1rem;
|
||||||
background-size: auto 1rem;
|
background-repeat: no-repeat;
|
||||||
background-repeat: no-repeat;
|
opacity: 0.5;
|
||||||
opacity: 0.5;
|
|
||||||
|
|
||||||
@if $enable-transitions {
|
@if $enable-transitions {
|
||||||
transition: opacity var(--transition);
|
transition: opacity var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:is([aria-current], :hover, :active, :focus) {
|
&:is([aria-current], :hover, :active, :focus) {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue