mirror of
https://github.com/picocss/pico
synced 2025-08-18 07:16:22 +00:00
Merge pull request #400 from asbjornu/include-close-button-in-classless
Include close icon styles in classless
This commit is contained in:
commit
873ad1b015
@ -1831,7 +1831,7 @@ dialog article > header,
|
||||
dialog article > footer {
|
||||
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-left: var(--spacing);
|
||||
float: right;
|
||||
@ -1848,6 +1848,23 @@ dialog article > footer [role=button]:not(:first-of-type) {
|
||||
dialog article p:last-of-type {
|
||||
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] {
|
||||
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 {
|
||||
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-left: var(--spacing);
|
||||
float: right;
|
||||
@ -1818,6 +1818,23 @@ dialog article > footer [role=button]:not(:first-of-type) {
|
||||
dialog article p:last-of-type {
|
||||
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] {
|
||||
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
|
||||
article {
|
||||
$close-selector: if($enable-classes, ".close", "a[rel='prev']");
|
||||
max-height: calc(100vh - var(--spacing) * 2);
|
||||
overflow: auto;
|
||||
|
||||
@ -50,7 +51,7 @@ dialog {
|
||||
}
|
||||
|
||||
> header {
|
||||
.close {
|
||||
#{$close-selector} {
|
||||
margin: 0;
|
||||
margin-left: var(--spacing);
|
||||
float: right;
|
||||
@ -76,27 +77,25 @@ dialog {
|
||||
}
|
||||
|
||||
// Close icon
|
||||
@if $enable-classes {
|
||||
.close {
|
||||
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;
|
||||
#{$close-selector} {
|
||||
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;
|
||||
|
||||
@if $enable-transitions {
|
||||
transition: opacity var(--transition);
|
||||
}
|
||||
@if $enable-transitions {
|
||||
transition: opacity var(--transition);
|
||||
}
|
||||
|
||||
&:is([aria-current], :hover, :active, :focus) {
|
||||
opacity: 1;
|
||||
}
|
||||
&:is([aria-current], :hover, :active, :focus) {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user