Skip to content
Open
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
30 changes: 17 additions & 13 deletions src/featherlight.gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
}


.featherlight-next span,
.featherlight-previous span {
display: none;
.featherlight-next a,
.featherlight-previous a {
display: inline-block;
opacity: 0.3;
position: absolute;

top: 50%;
Expand All @@ -60,16 +61,19 @@
font-style: normal;
font-weight: normal;
}
.featherlight-next span {
.featherlight-next a {
right: 5%;
left: auto;
}


.featherlight-next:hover span,
.featherlight-previous:hover span {
display: inline-block;
}
.featherlight-next:hover a,
.featherlight-previous:hover a,
.featherlight-next a:focus,
.featherlight-previous a:focus,
.featherlight-next a:active,
.featherlight-previous a:active {
opacity: 1;
}

.featherlight-swipe-aware .featherlight-next,
.featherlight-swipe-aware .featherlight-previous {
Expand All @@ -94,8 +98,8 @@
.featherlight-previous:hover {
background: none;
}
.featherlight-next span,
.featherlight-previous span {
.featherlight-next a,
.featherlight-previous a {
display: block;
}
}
Expand All @@ -114,8 +118,8 @@
right: 85%;
}

.featherlight-next span,
.featherlight-previous span {
.featherlight-next a,
.featherlight-previous a {
margin-top: -30px;
font-size: 40px;
}
Expand Down
8 changes: 4 additions & 4 deletions src/featherlight.gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
}

self.$instance.find('.'+self.namespace+'-content')
.append(self.createNavigation('previous'))
.append(self.createNavigation('next'));
.prepend(self.createNavigation('previous'))
.prepend(self.createNavigation('next'));

return _super(event);
},
Expand Down Expand Up @@ -148,10 +148,10 @@

createNavigation: function(target) {
var self = this;
return $('<span title="'+target+'" class="'+this.namespace+'-'+target+'"><span>'+this[target+'Icon']+'</span></span>').click(function(evt){
return $('<span title="'+target+'" class="'+this.namespace+'-'+target+'"><a href="#" aria-label="' + target + '">'+this[target+'Icon']+'</a></span>').on('click keypress', (function (evt) {
$(this).trigger(target+'.'+self.namespace);
evt.preventDefault();
});
}));
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/featherlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
return $(elem).attr('tabindex');
});

this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr('tabindex', -1);
this._$previouslyWithTabIndex.add(this._$previouslyTabbable).not("[title='previous'] a").not("[title='next'] a").attr('tabindex', -1);

if (document.activeElement.blur) {
document.activeElement.blur();
Expand Down