Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Disable pointer events on gallery items, enable on the first-of-type as inititalizer #14

Merged
merged 2 commits into from May 5, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions dist/gallery.css
Expand Up @@ -9,10 +9,12 @@
}

.gallery .item:first-of-type {
pointer-events: auto;
position: static;
opacity: 1;
}
.gallery .item {
pointer-events: none;
position: absolute;
top: 0;
left: 0;
Expand Down
6 changes: 3 additions & 3 deletions sass/_gallery.scss
Expand Up @@ -38,13 +38,13 @@
}

.gallery {
.item:first-of-type { position: static; opacity: 1; } // Set the first item to be visible
.item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; }
.item:first-of-type { pointer-events: auto; position: static; opacity: 1; } // Set the first item to be visible
.item { pointer-events: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; }

.control-operator { display: none; } // Stop hash links from scrolling up and down

.control-operator:target ~ .item { pointer-events: none; opacity: 0; animation: none; } // Unselected image

.control-button:first-of-type { @extend %active-button; }
.control-operator:target ~ .controls .control-button { @extend %inactive-button; animation: none; } // Kill button animation when there is a selected image
}
}