diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl new file mode 100644 index 00000000000..77590715a11 --- /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 b3f87044e06..8ded4aa8834 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1341,6 +1341,7 @@ table th[data-sortt-desc] .svg { align-items: center; gap: .25rem; vertical-align: middle; + min-width: 0; } .ui.dropdown .ui.label .svg { @@ -1357,6 +1358,7 @@ table th[data-sortt-desc] .svg { display: flex; align-items: center; gap: .25rem; + min-width: 0; } /* to override Fomantic's default display: block for ".menu .item", and use a slightly larger gap for menu item content */ @@ -1364,4 +1366,5 @@ table th[data-sortt-desc] .svg { display: flex !important; align-items: center; gap: .5rem; + min-width: 0; } diff --git a/web_src/css/modules/label.css b/web_src/css/modules/label.css index 32e772ea5b0..696080b6670 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);