Skip to content

Commit

Permalink
Merge pull request #383 from marekdedic/no-button
Browse files Browse the repository at this point in the history
Replaced <button> with <div>
  • Loading branch information
marekdedic authored Aug 9, 2022
2 parents 3192700 + c41e2d5 commit 3718457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
20 changes: 5 additions & 15 deletions src/imagelightbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,10 @@
width: 4em; /* 53.3 */
height: 4em; /* 53.3 */
background-color: rgba(130, 130, 130, 0.8);
vertical-align: middle;
display: none;
position: fixed;
z-index: 10001;
top: 50%;
padding: 0;
margin-top: -3.75em; /* 60 */
}
.imagelightbox-arrow:hover {
Expand All @@ -184,22 +182,19 @@
right: 2.5em; /* 40 */
}
.imagelightbox-arrow:before {
width: 0;
height: 0;
border: 1em solid transparent;
content: '';
display: inline-block;
margin-bottom: -7%;
position: absolute;
top: 25%;
left: 50%;
}
.imagelightbox-arrow-left:before {
border-left: none;
border-right-color: #fff;
margin-left: -0.35em;
margin-left: -1.7em;
}
.imagelightbox-arrow-right:before {
border-right: none;
border-left-color: #fff;
margin-left: 0.2em;
margin-left: -0.3em;
}

.imagelightbox-loading,
Expand All @@ -223,11 +218,6 @@
top: 1.25em; /* 20 */
right: 1.25em; /* 20 */
}
.imagelightbox-arrow {
width: 2.5em; /* 40 */
height: 3.75em; /* 60 */
margin-top: -1.875em; /* 30 */
}
.imagelightbox-arrow-left {
left: 1.25em; /* 20 */
}
Expand Down
9 changes: 3 additions & 6 deletions src/imagelightbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@
const $activityObject = $("<div/>")
.attr("class", "imagelightbox-loading")
.append($("<div/>")),
$arrowLeftObject = $("<button/>", {
type: "button",
$arrowLeftObject = $("<div/>", {
class: "imagelightbox-arrow imagelightbox-arrow-left",
}),
$arrowRightObject = $("<button/>", {
type: "button",
$arrowRightObject = $("<div/>", {
class: "imagelightbox-arrow imagelightbox-arrow-right",
}),
$arrows = $arrowLeftObject.add($arrowRightObject),
$captionObject = $("<div/>", {
class: "imagelightbox-caption",
html: "&nbsp;",
}),
$buttonObject = $("<button/>", {
type: "button",
$buttonObject = $("<div/>", {
class: "imagelightbox-close",
}),
$overlayObject = $("<div/>", {
Expand Down

0 comments on commit 3718457

Please sign in to comment.