Skip to content

Commit

Permalink
minor CSS tweaks for legibility and compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Apr 9, 2021
1 parent 45accef commit 16f903f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
20 changes: 13 additions & 7 deletions css/pg-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@

/* CAROUSEL AND EXHIBITION BASICS */

/*
html {
scroll-snap-type: block proximity;
scroll-behavior: smooth;
}
*/

.pg-exhibition-wrapper {
scroll-snap-align: start;
Expand Down Expand Up @@ -122,8 +124,6 @@ html {
.pg-carousel-wrapper, .pg-exhibition-wrapper {
box-sizing: border-box;
display: block;
max-height: 100vh;
max-width: 100vw;
width: 100%;
height: 100%;
overflow: hidden;
Expand Down Expand Up @@ -390,21 +390,27 @@ html {
top: 50%;
width: auto;
margin-top: -15px;
padding: 15px;
font-size: 15px;
user-select: none;
color: white;
font-weight: bold;
font-size: 20px;
font-weight: normal;
user-select: none;
box-sizing: border-box;
opacity: 50%;
opacity: 80%;
background-color: rgb(58, 58, 58);
}

.pg-exhibition .gallery-prev span, .pg-exhibition .gallery-next span {
color: black;
background-color: rgb(51, 51, 51);
}

.gallery-prev span {
padding: 7px 12px 7px 11px;
}

.gallery-next span{
right: 0;
padding: 7px 11px 7px 12px;
}

.gallery-prev:hover span, .gallery-next:hover span {
Expand Down
2 changes: 1 addition & 1 deletion css/pg-style.min.css

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

4 changes: 2 additions & 2 deletions js/pg-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ window.addEventListener('scroll', function (event) {

for (i = 0; i < carousels.length; i++) {
var elem = carousels[i];
if (isInViewport(elem)) elem.focus({ preventScroll: false });
if (isInViewport(elem)) elem.focus({ preventScroll: true });
else elem.blur();
}
for (i = 0; i < exhibitions.length; i++) {
var elem = exhibitions[i];
if (isInViewport(elem)) elem.focus({ preventScroll: false });
if (isInViewport(elem)) elem.focus({ preventScroll: true });
else elem.blur();
}
}, 100);
Expand Down
Loading

0 comments on commit 16f903f

Please sign in to comment.