@carbon/ibmdotcom-styles 2.22.0 → 2.24.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/dist/ibm-dotcom-styles.css +259 -42
- package/dist/ibm-dotcom-styles.min.css +21 -5
- package/package.json +2 -2
- package/scss/components/card-group/_card-group.scss +51 -1
- package/scss/components/masthead/_masthead-l1.scss +3 -1
- package/scss/components/quote/_quote.scss +60 -1
- package/scss/components/structured-list/_structured-list.scss +8 -1
- package/scss/globals/_scroll-snap.scss +24 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ibmdotcom-styles",
|
|
3
3
|
"description": "Carbon for IBM.com Styles",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.24.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/ibm-dotcom-styles.min.css",
|
|
7
7
|
"module": "src/scss",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"sass": "~1.84.0",
|
|
49
49
|
"sass-loader": "^13.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "fa8caaccbd76c72beac47f83c0d6da573fdb413e"
|
|
52
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@use '@carbon/styles/scss/themes' as *;
|
|
15
15
|
@use '@carbon/styles/scss/type' as *;
|
|
16
16
|
@use '@carbon/styles/scss/utilities/convert' as *;
|
|
17
|
+
@use '@carbon/ibmdotcom-styles/scss/globals/scroll-snap' as *;
|
|
17
18
|
@use '../../globals/utils/flex-grid' as *;
|
|
18
19
|
@use '../../globals/vars' as *;
|
|
19
20
|
@use '../../globals/imports' as *;
|
|
@@ -42,7 +43,9 @@
|
|
|
42
43
|
1fr
|
|
43
44
|
);
|
|
44
45
|
}
|
|
46
|
+
}
|
|
45
47
|
|
|
48
|
+
:host(#{$c4d-prefix}-card-group):not(.is-full-width-template) {
|
|
46
49
|
@include breakpoint-down(md) {
|
|
47
50
|
padding-inline: $spacing-05;
|
|
48
51
|
}
|
|
@@ -241,6 +244,53 @@
|
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
246
|
|
|
247
|
+
// Mobile horizontal scroll snap behavior
|
|
248
|
+
:host(#{$c4d-prefix}-card-group).inside-block-cards:not(
|
|
249
|
+
.media-type-block-cards__logo
|
|
250
|
+
) {
|
|
251
|
+
$gutter: 1rem;
|
|
252
|
+
$gap: 1rem;
|
|
253
|
+
|
|
254
|
+
@include breakpoint-down('md') {
|
|
255
|
+
@include scroll-snap-container();
|
|
256
|
+
|
|
257
|
+
display: flex;
|
|
258
|
+
gap: $gap;
|
|
259
|
+
padding-inline: $gutter;
|
|
260
|
+
|
|
261
|
+
> ::slotted(a) {
|
|
262
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
263
|
+
display: grid !important;
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
flex-basis: clamp(220px, 65vw, 400px);
|
|
266
|
+
flex-shrink: 0;
|
|
267
|
+
align-content: start;
|
|
268
|
+
block-size: auto;
|
|
269
|
+
|
|
270
|
+
// override web component internal padding and rely on gap instead
|
|
271
|
+
padding-inline: 0;
|
|
272
|
+
|
|
273
|
+
scroll-margin: $gutter;
|
|
274
|
+
scroll-snap-align: start;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
> ::slotted(#{$c4d-prefix}-card-group-item) {
|
|
278
|
+
display: grid;
|
|
279
|
+
box-sizing: border-box;
|
|
280
|
+
flex-basis: clamp(220px, 65vw, 400px);
|
|
281
|
+
flex-shrink: 0;
|
|
282
|
+
align-content: start;
|
|
283
|
+
block-size: auto;
|
|
284
|
+
|
|
285
|
+
// // override web component internal padding and rely on gap instead
|
|
286
|
+
padding-inline: 0;
|
|
287
|
+
|
|
288
|
+
scroll-margin: $gutter;
|
|
289
|
+
scroll-snap-align: start;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
244
294
|
// Print styles
|
|
245
295
|
@media print {
|
|
246
296
|
:host(#{$c4d-prefix}-card-group) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -150,6 +150,8 @@ $search-transition-timing: 95ms;
|
|
|
150
150
|
|
|
151
151
|
&.is-open {
|
|
152
152
|
box-shadow: 0 2px 6px 0 $shadow;
|
|
153
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
154
|
+
inline-size: 100vw !important;
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
&:not(.is-open) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -190,4 +190,63 @@
|
|
|
190
190
|
|
|
191
191
|
display: inline-block;
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
.#{$prefix}-bubble-quote {
|
|
195
|
+
position: relative;
|
|
196
|
+
padding: 2.5rem;
|
|
197
|
+
border: 1px solid #8d8d8d;
|
|
198
|
+
border-radius: 0.25rem;
|
|
199
|
+
background: #f4f4f4;
|
|
200
|
+
margin-block-end: 3.81rem; /* match svg pointer height */
|
|
201
|
+
margin-inline: 0;
|
|
202
|
+
|
|
203
|
+
@include breakpoint-down(md) {
|
|
204
|
+
/* mobile inline gutters for the bubble quote */
|
|
205
|
+
margin-inline: 16px;
|
|
206
|
+
max-inline-size: calc(100% - 32px);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.bubble-pointer {
|
|
210
|
+
--fill: #f4f4f4;
|
|
211
|
+
--stroke: #8d8d8d;
|
|
212
|
+
|
|
213
|
+
position: absolute;
|
|
214
|
+
inset-block-start: 100%;
|
|
215
|
+
inset-inline-start: 2rem;
|
|
216
|
+
|
|
217
|
+
@include breakpoint-down(md) {
|
|
218
|
+
/* adjusting the pointer top position a bit since the max-inline-size calc changes in mobile. */
|
|
219
|
+
inset-block-start: calc(100% - 1px);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.bubble-pointer-fill {
|
|
224
|
+
fill: var(--fill);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.bubble-pointer-stroke {
|
|
228
|
+
stroke: var(--stroke);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host([mark-type='bubble-quote']) {
|
|
233
|
+
span.cds--quote__mark[part~='mark--opening'] {
|
|
234
|
+
z-index: 1;
|
|
235
|
+
inset-block-start: 2.5rem;
|
|
236
|
+
inset-inline-start: 0.875rem;
|
|
237
|
+
|
|
238
|
+
@include breakpoint-down(lg) {
|
|
239
|
+
inset-inline-start: 1.25rem;
|
|
240
|
+
}
|
|
241
|
+
@include breakpoint-down(md) {
|
|
242
|
+
inset-inline-start: 2.8rem;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Mirroing the bubble quote in RTL modes */
|
|
248
|
+
:host([lang='ar']) .#{$prefix}-bubble-quote .bubble-pointer {
|
|
249
|
+
inset-inline: auto 2rem;
|
|
250
|
+
transform: scaleX(-1);
|
|
251
|
+
}
|
|
193
252
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2019,
|
|
2
|
+
// Copyright IBM Corp. 2019, 2025
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
--cols: var(--col-span-#{$colNumber}, 2);
|
|
21
21
|
--width: calc((var(--cols) / var(--max-cols)) * 100%);
|
|
22
22
|
|
|
23
|
+
@include breakpoint-down(md) {
|
|
24
|
+
//Adjusting the mobile column width calculation. We're subtracting 5% of its width in mobile so that the next column 'peeks out' from the right side of the screen, indicating there's more scrollable content.
|
|
25
|
+
--width: calc(
|
|
26
|
+
(var(--cols) / var(--max-cols)) * 100% - var(--mobile-peek, 5%)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
flex: 0 0 var(--width);
|
|
24
31
|
|
|
25
32
|
max-inline-size: var(--width);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2020, 2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/breakpoint' as *;
|
|
11
|
+
|
|
12
|
+
@mixin scroll-snap-container() {
|
|
13
|
+
overflow: scroll hidden;
|
|
14
|
+
// Width safeguards
|
|
15
|
+
inline-size: 100%;
|
|
16
|
+
max-inline-size: 100vw;
|
|
17
|
+
overscroll-behavior-x: contain;
|
|
18
|
+
|
|
19
|
+
// Extra space for auto-appearing scrollbar
|
|
20
|
+
padding-block: 4px 1rem;
|
|
21
|
+
|
|
22
|
+
// Extra space for css outlines on inner cards
|
|
23
|
+
scroll-snap-type: x mandatory;
|
|
24
|
+
}
|