aboutsummaryrefslogtreecommitdiff
path: root/src/components/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/gallery')
-rw-r--r--src/components/gallery/gallery.vue100
1 files changed, 49 insertions, 51 deletions
diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue
index bc18f545..96b554e3 100644
--- a/src/components/gallery/gallery.vue
+++ b/src/components/gallery/gallery.vue
@@ -87,7 +87,7 @@
<script src='./gallery.js'></script>
<style lang="scss">
-@import '../../_variables.scss';
+@import "../../variables";
.Gallery {
.gallery-rows {
@@ -101,6 +101,53 @@
width: 100%;
flex-grow: 1;
+ .gallery-row-inner {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ flex-flow: row wrap;
+ align-content: stretch;
+
+ .gallery-item {
+ margin: 0 0.5em 0 0;
+ flex-grow: 1;
+ height: 100%;
+ box-sizing: border-box;
+ // to make failed images a bit more noticeable on chromium
+ min-width: 2em;
+
+ &:last-child {
+ margin: 0;
+ }
+ }
+
+ &.-grid {
+ width: 100%;
+ height: auto;
+ position: relative;
+ display: grid;
+ grid-gap: 0.5em;
+ grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
+
+ .gallery-item {
+ margin: 0;
+ height: 200px;
+ }
+ }
+ }
+
+ &.-grid,
+ &.-minimal {
+ height: auto;
+
+ .gallery-row-inner {
+ position: relative;
+ }
+ }
+
&:not(:first-child) {
margin-top: 0.5em;
}
@@ -115,7 +162,7 @@
linear-gradient(to top, white, white);
/* Autoprefixed seem to ignore this one, and also syntax is different */
- -webkit-mask-composite: xor;
+ mask-composite: xor;
mask-composite: exclude;
}
}
@@ -139,54 +186,5 @@
padding: 0 2em;
}
}
-
- .gallery-row {
- &.-grid,
- &.-minimal {
- height: auto;
- .gallery-row-inner {
- position: relative;
- }
- }
- }
-
- .gallery-row-inner {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- align-content: stretch;
-
- &.-grid {
- width: 100%;
- height: auto;
- position: relative;
- display: grid;
- grid-column-gap: 0.5em;
- grid-row-gap: 0.5em;
- grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
-
- .gallery-item {
- margin: 0;
- height: 200px;
- }
- }
- }
-
- .gallery-item {
- margin: 0 0.5em 0 0;
- flex-grow: 1;
- height: 100%;
- box-sizing: border-box;
- // to make failed images a bit more noticeable on chromium
- min-width: 2em;
- &:last-child {
- margin: 0;
- }
- }
}
</style>