diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl new file mode 100644 index 000000000..77590715a --- /dev/null +++ b/templates/devtest/label.tmpl @@ -0,0 +1,27 @@ +{{template "base/head" .}} + +
+
+

Label

+
+ simple label + red label + green label +
+
+ basic label + basic red label + basic green label +
+
+ long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+
+{{template "base/footer" .}} diff --git a/web_src/css/base.css b/web_src/css/base.css index 06542c652..d2788babb 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1562,6 +1562,7 @@ table th[data-sortt-desc] .svg { align-items: center; gap: .25rem; vertical-align: middle; + min-width: 0; } .ui.ui.button { @@ -1582,4 +1583,5 @@ table th[data-sortt-desc] .svg { display: flex; align-items: center; gap: .25rem; + min-width: 0; } diff --git a/web_src/css/modules/label.css b/web_src/css/modules/label.css index 32e772ea5..696080b66 100644 --- a/web_src/css/modules/label.css +++ b/web_src/css/modules/label.css @@ -5,6 +5,8 @@ display: inline-flex; align-items: center; gap: .25rem; + min-width: 0; + max-width: 100%; /* since we are using "flex" to align label contents, we also need to limit the x-axis, a label shouldn't be wider than 100% */ vertical-align: middle; line-height: 1; background: var(--color-label-bg);