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

Commit

Permalink
Merge pull request #14 from JoePerkins/master
Browse files Browse the repository at this point in the history
Disable pointer events on gallery items, enable on the first-of-type as inititalizer
  • Loading branch information
benschwarz committed May 5, 2014
2 parents ee205d5 + c2c938a commit fa316f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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
}
}

0 comments on commit fa316f9

Please sign in to comment.