@gitlab/ui 86.5.0 → 86.5.1
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
|
@@ -66,14 +66,24 @@ $badge-min-width: $gl-spacing-scale-3;
|
|
|
66
66
|
/* Basic badge styles */
|
|
67
67
|
|
|
68
68
|
.gl-badge {
|
|
69
|
-
@include gl-display-inline-flex;
|
|
70
|
-
@include gl-align-items-center;
|
|
71
|
-
@include gl-justify-content-center;
|
|
72
69
|
@include gl-font-sm;
|
|
73
70
|
@include gl-font-weight-normal;
|
|
74
71
|
@include gl-line-height-normal;
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
CSS Grid is used here to deal with 3 cases:
|
|
75
|
+
* Badge shouldn't shrink inside flex containers by default
|
|
76
|
+
* Content inside the badge should shrink when gl-text-truncate class is used on the contents
|
|
77
|
+
* Badge should have a minimal width of 20 pixels (for example when `1` is passed inside the slot)
|
|
78
|
+
*/
|
|
79
|
+
display: inline-grid;
|
|
80
|
+
grid-auto-flow: column;
|
|
81
|
+
grid-template-columns: minmax($badge-min-width, auto);
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
75
84
|
gap: $gl-spacing-scale-2;
|
|
76
85
|
padding: $gl-spacing-scale-1 $badge-padding-horizontal;
|
|
86
|
+
min-width: fit-content;
|
|
77
87
|
|
|
78
88
|
@media (forced-colors: active) {
|
|
79
89
|
border: 1px solid;
|
|
@@ -85,10 +95,6 @@ $badge-min-width: $gl-spacing-scale-3;
|
|
|
85
95
|
@include gl-flex-shrink-0;
|
|
86
96
|
top: auto;
|
|
87
97
|
}
|
|
88
|
-
|
|
89
|
-
.gl-badge-content {
|
|
90
|
-
min-width: $badge-min-width;
|
|
91
|
-
}
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
/* Variants */
|
|
@@ -83,10 +83,6 @@ export default {
|
|
|
83
83
|
:class="{ '-gl-ml-2 gl-ml-n2': isCircularIcon }"
|
|
84
84
|
:name="icon"
|
|
85
85
|
/>
|
|
86
|
-
|
|
87
|
-
<span v-if="$slots.default" class="gl-badge-content">
|
|
88
|
-
<!-- @slot The badge content to display. -->
|
|
89
|
-
<slot></slot>
|
|
90
|
-
</span>
|
|
86
|
+
<slot></slot>
|
|
91
87
|
</b-badge>
|
|
92
88
|
</template>
|