Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Apr 14, 2024
1 parent 4c6e2da commit b28bc6d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions templates/devtest/label.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{template "base/head" .}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
<div class="page-content devtest ui container">
<div>
<h1>Label</h1>
<div>
<div class="flex-text-block tw-my-2">
<span class="ui label">simple label</span>
<span class="ui red label">red label</span>
<span class="ui green label">green label</span>
</div>
<div class="flex-text-block tw-my-2">
<span class="ui basic label">basic label</span>
<span class="ui basic red label">basic red label</span>
<span class="ui basic green label">basic green label</span>
</div>
<div class="flex-text-block tw-my-2">
<span class="ui label">long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span>
</div>
<div class="flex-text-block tw-my-2">
<span class="ui label"><span class="gt-ellipsis">very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span></span>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}
3 changes: 3 additions & 0 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,7 @@ table th[data-sortt-desc] .svg {
align-items: center;
gap: .25rem;
vertical-align: middle;
min-width: 0;
}

.ui.ui.button {
Expand All @@ -1365,11 +1366,13 @@ 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 */
.ui.dropdown .menu.flex-items-menu > .item {
display: flex !important;
align-items: center;
gap: .5rem;
min-width: 0;
}
1 change: 1 addition & 0 deletions web_src/css/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Gitea's private styles use `g-` prefix.
overflow: hidden !important;
white-space: nowrap !important;
text-overflow: ellipsis !important;
min-width: 0;
}

.g-table-auto-ellipsis td.auto-ellipsis {
Expand Down
1 change: 1 addition & 0 deletions web_src/css/modules/label.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
display: inline-flex;
align-items: center;
gap: .25rem;
min-width: 0;
vertical-align: middle;
line-height: 1;
background: var(--color-label-bg);
Expand Down

0 comments on commit b28bc6d

Please sign in to comment.