@lumx/core 2.1.9-alpha-thumbnail2 → 2.1.9-alpha-thumbnail3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "version": "yarn version-changelog ../../CHANGELOG.md && yarn changelog-verify ../../CHANGELOG.md && git add ../../CHANGELOG.md"
43
43
  },
44
44
  "sideEffects": false,
45
- "version": "2.1.9-alpha-thumbnail2",
45
+ "version": "2.1.9-alpha-thumbnail3",
46
46
  "devDependencies": {
47
47
  "@babel/core": "^7.8.3",
48
48
  "@babel/plugin-proposal-class-properties": "^7.8.3",
@@ -82,5 +82,5 @@
82
82
  "moment": "^2.24.0",
83
83
  "moment-range": "^4.0.2"
84
84
  },
85
- "gitHead": "105e60082267526f6ac979d2c2d725417a1d6190"
85
+ "gitHead": "e57c222583d0f3fff98a3934a16a754302c88e3d"
86
86
  }
@@ -11,6 +11,8 @@
11
11
  display: flex;
12
12
  flex: 1 1 auto;
13
13
  flex-direction: column;
14
+ justify-content: center;
15
+ align-items: center;
14
16
  }
15
17
 
16
18
  &__wrapper {
@@ -12,21 +12,11 @@
12
12
  background: none;
13
13
  outline: none;
14
14
 
15
- &__background {
16
- overflow: hidden;
17
- background-position: center;
18
- background-repeat: no-repeat;
19
- background-size: cover;
20
- }
21
-
15
+ &__background,
22
16
  &__image {
23
17
  display: block;
24
- // Make sure
25
18
  overflow: hidden;
26
- }
27
19
 
28
- &__background,
29
- &__image {
30
20
  #{$self}--align-left & {
31
21
  margin-right: auto;
32
22
  }
@@ -85,17 +75,23 @@
85
75
 
86
76
  /* Thumbnail error fallback */
87
77
  &--has-error {
88
- #{$self}__background {
78
+ /* #{$self}__background {
89
79
  display: grid;
90
80
 
91
81
  // Stack image and fallback on top of each other
92
- & > * {
82
+ #{$self}__image,
83
+ #{$self}__fallback,
84
+ {
85
+ position: initial;
93
86
  grid-column: 1;
94
87
  grid-row: 1;
95
88
  }
96
89
  }
90
+ */
97
91
 
98
92
  #{$self}__fallback {
93
+ position: absolute;
94
+ inset: 0;
99
95
  display: flex;
100
96
  align-items: center;
101
97
  justify-content: center;
@@ -109,9 +105,11 @@
109
105
  ========================================================================== */
110
106
 
111
107
  @each $key, $size in $lumx-sizes {
112
- .#{$lumx-base-prefix}-thumbnail--size-#{$key}:not(.#{$lumx-base-prefix}-thumbnail--fill-height) {
113
- width: $size;
108
+ .#{$lumx-base-prefix}-thumbnail--size-#{$key} {
109
+ max-width: $size;
110
+ width: 100%;
114
111
 
112
+ .#{$lumx-base-prefix}-thumbnail__background,
115
113
  .#{$lumx-base-prefix}-thumbnail__image {
116
114
  width: 100%;
117
115
  }
@@ -122,25 +120,14 @@
122
120
  ========================================================================== */
123
121
 
124
122
  .#{$lumx-base-prefix}-thumbnail:not(.#{$lumx-base-prefix}-thumbnail--aspect-ratio-original) {
125
- &::before {
126
- display: block;
127
- content: "";
128
- //width: 100%;
129
- //float: left;
130
- }
131
-
132
- /*&::after {
133
- display: block;
134
- content: "";
135
- clear: both;
136
- }*/
137
123
 
138
124
  .#{$lumx-base-prefix}-thumbnail__background {
139
- position: absolute;
140
- inset: 0;
125
+ position: relative;
141
126
  }
142
127
 
143
128
  .#{$lumx-base-prefix}-thumbnail__image {
129
+ position: absolute;
130
+ inset: 0;
144
131
  width: 100%;
145
132
  height: 100%;
146
133
  object-fit: cover;
@@ -150,7 +137,7 @@
150
137
 
151
138
  @each $key, $aspect-ratio in $lumx-thumbnail-aspect-ratio {
152
139
  .#{$lumx-base-prefix}-thumbnail--aspect-ratio-#{$key} {
153
- &::before {
140
+ .#{$lumx-base-prefix}-thumbnail__background {
154
141
  padding-top: $aspect-ratio;
155
142
  }
156
143
  }