@odx/ui 5.3.6 → 5.5.0
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
package/scss/card.component.scss
CHANGED
|
@@ -82,15 +82,41 @@
|
|
|
82
82
|
display: block;
|
|
83
83
|
margin: $img-margin $img-margin 0 $img-margin;
|
|
84
84
|
max-height: var(--odx-card-image-max-height);
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
/* allow the image container to span the card width (including the card padding)
|
|
87
|
+
so aspect-ratio can compute height. We compute width as 100% + 2 * padding
|
|
88
|
+
and keep the negative margins so the element visually spans the card edges. */
|
|
89
|
+
max-width: none;
|
|
86
90
|
overflow: clip;
|
|
91
|
+
width: calc(100% + (#{$main-padding} * 2));
|
|
92
|
+
|
|
93
|
+
&__img {
|
|
94
|
+
aspect-ratio: var(--odx-card-image-aspect-ratio);
|
|
95
|
+
display: block;
|
|
96
|
+
max-height: var(--odx-card-image-max-height);
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
position: relative; /* required for ngOptimizedImage's img[fill] */
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Fallback when aspect-ratio is "auto": ensure the image area has a usable height
|
|
103
|
+
so ngSrc[fill] (absolutely positioned img) has a non-zero container. The
|
|
104
|
+
host gets the class `has-aspect-auto` from the component when
|
|
105
|
+
imageRatio resolves to 'auto'. The fallback height can be overridden by
|
|
106
|
+
setting --odx-card-image-fallback-height. */
|
|
107
|
+
&.has-aspect-auto.has-fill {
|
|
108
|
+
#{$root}-image__img {
|
|
109
|
+
max-height: var(--odx-card-image-max-height);
|
|
110
|
+
min-height: var(--odx-card-image-fallback-height, 200px);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
87
113
|
|
|
88
114
|
img {
|
|
89
115
|
aspect-ratio: var(--odx-card-image-aspect-ratio);
|
|
90
116
|
display: block;
|
|
91
117
|
height: auto;
|
|
92
118
|
max-width: 100%;
|
|
93
|
-
object-fit:
|
|
119
|
+
object-fit: var(--odx-card-image-object-fit);
|
|
94
120
|
}
|
|
95
121
|
}
|
|
96
122
|
|
|
@@ -100,6 +126,7 @@
|
|
|
100
126
|
position: absolute;
|
|
101
127
|
top: $main-padding;
|
|
102
128
|
width: calc(100% - dimensions.get-size(math.div(40, 24)) - #{$main-padding} - dimensions.get-size(math.div(30, 24)));
|
|
129
|
+
z-index: var(--odx-v-layer-2);
|
|
103
130
|
}
|
|
104
131
|
|
|
105
132
|
&__content {
|
|
@@ -121,6 +148,12 @@
|
|
|
121
148
|
padding-right: dimensions.get-size(math.div(36, 24));
|
|
122
149
|
}
|
|
123
150
|
|
|
151
|
+
#{$root}--launch-tile & {
|
|
152
|
+
@include breakpoints.container-down(card-root, phone) {
|
|
153
|
+
margin-inline-end: dimensions.get-size(math.div(36, 24));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
124
157
|
#{$root}--launch-tile &,
|
|
125
158
|
#{$root}--launch-tile-centered & {
|
|
126
159
|
font-size: dimensions.get-size(math.div(20, 24));
|
|
@@ -135,10 +168,6 @@
|
|
|
135
168
|
|
|
136
169
|
font-size: dimensions.get-size(math.div(25, 24));
|
|
137
170
|
}
|
|
138
|
-
|
|
139
|
-
@include breakpoints.container-down(card-root, phone) {
|
|
140
|
-
margin-inline-end: dimensions.get-size(math.div(36, 24));
|
|
141
|
-
}
|
|
142
171
|
}
|
|
143
172
|
}
|
|
144
173
|
|
|
@@ -82,15 +82,41 @@
|
|
|
82
82
|
display: block;
|
|
83
83
|
margin: $img-margin $img-margin 0 $img-margin;
|
|
84
84
|
max-height: var(--odx-card-image-max-height);
|
|
85
|
-
|
|
85
|
+
|
|
86
|
+
/* allow the image container to span the card width (including the card padding)
|
|
87
|
+
so aspect-ratio can compute height. We compute width as 100% + 2 * padding
|
|
88
|
+
and keep the negative margins so the element visually spans the card edges. */
|
|
89
|
+
max-width: none;
|
|
86
90
|
overflow: clip;
|
|
91
|
+
width: calc(100% + (#{$main-padding} * 2));
|
|
92
|
+
|
|
93
|
+
&__img {
|
|
94
|
+
aspect-ratio: var(--odx-card-image-aspect-ratio);
|
|
95
|
+
display: block;
|
|
96
|
+
max-height: var(--odx-card-image-max-height);
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
position: relative; /* required for ngOptimizedImage's img[fill] */
|
|
99
|
+
width: 100%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Fallback when aspect-ratio is "auto": ensure the image area has a usable height
|
|
103
|
+
so ngSrc[fill] (absolutely positioned img) has a non-zero container. The
|
|
104
|
+
host gets the class `has-aspect-auto` from the component when
|
|
105
|
+
imageRatio resolves to 'auto'. The fallback height can be overridden by
|
|
106
|
+
setting --odx-card-image-fallback-height. */
|
|
107
|
+
&.has-aspect-auto.has-fill {
|
|
108
|
+
#{$root}-image__img {
|
|
109
|
+
max-height: var(--odx-card-image-max-height);
|
|
110
|
+
min-height: var(--odx-card-image-fallback-height, 200px);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
87
113
|
|
|
88
114
|
img {
|
|
89
115
|
aspect-ratio: var(--odx-card-image-aspect-ratio);
|
|
90
116
|
display: block;
|
|
91
117
|
height: auto;
|
|
92
118
|
max-width: 100%;
|
|
93
|
-
object-fit:
|
|
119
|
+
object-fit: var(--odx-card-image-object-fit);
|
|
94
120
|
}
|
|
95
121
|
}
|
|
96
122
|
|
|
@@ -100,6 +126,7 @@
|
|
|
100
126
|
position: absolute;
|
|
101
127
|
top: $main-padding;
|
|
102
128
|
width: calc(100% - dimensions.get-size(math.div(40, 24)) - #{$main-padding} - dimensions.get-size(math.div(30, 24)));
|
|
129
|
+
z-index: var(--odx-v-layer-2);
|
|
103
130
|
}
|
|
104
131
|
|
|
105
132
|
&__content {
|
|
@@ -121,6 +148,12 @@
|
|
|
121
148
|
padding-right: dimensions.get-size(math.div(36, 24));
|
|
122
149
|
}
|
|
123
150
|
|
|
151
|
+
#{$root}--launch-tile & {
|
|
152
|
+
@include breakpoints.container-down(card-root, phone) {
|
|
153
|
+
margin-inline-end: dimensions.get-size(math.div(36, 24));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
124
157
|
#{$root}--launch-tile &,
|
|
125
158
|
#{$root}--launch-tile-centered & {
|
|
126
159
|
font-size: dimensions.get-size(math.div(20, 24));
|
|
@@ -135,10 +168,6 @@
|
|
|
135
168
|
|
|
136
169
|
font-size: dimensions.get-size(math.div(25, 24));
|
|
137
170
|
}
|
|
138
|
-
|
|
139
|
-
@include breakpoints.container-down(card-root, phone) {
|
|
140
|
-
margin-inline-end: dimensions.get-size(math.div(36, 24));
|
|
141
|
-
}
|
|
142
171
|
}
|
|
143
172
|
}
|
|
144
173
|
|