Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include close icon styles in classless #400

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion css/pico.classless.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/pico.classless.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.classless.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.classless.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.css.map

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion css/pico.fluid.classless.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/pico.fluid.classless.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.fluid.classless.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.fluid.classless.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/pico.min.css.map

Large diffs are not rendered by default.

41 changes: 20 additions & 21 deletions scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -50,7 +51,7 @@ dialog {
}

> header {
.close {
#{$close-selector} {
margin: 0;
margin-left: var(--spacing);
float: right;
Expand All @@ -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;

@if $enable-transitions {
transition: opacity var(--transition);
}
#{$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);
}

&:is([aria-current], :hover, :active, :focus) {
opacity: 1;
}
&:is([aria-current], :hover, :active, :focus) {
opacity: 1;
}
}
}
Expand Down