Refactor text utility classes to Tailwind CSS (#36703)
Replace Fomantic/custom CSS text utility classes with their Tailwind equivalents: - `.text.<color>` compound classes → `tw-text-<color>` classes - `.text.small` (`font-size: 0.75em`) → `tw-text-xs` (11px) - `.text.truncate` (`overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block`) → `tw-inline-block tw-truncate` Remove the now-unused CSS rules from `base.css` and `dashboard.css`. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
{{/* the logic should be kept the same as getIssueIcon/getIssueColor in JS code */}}
|
||||
{{/* the logic should be kept the same as getIssueIcon/getIssueColorClass in JS code */}}
|
||||
{{- if .IsPull -}}
|
||||
{{- if not .PullRequest -}}
|
||||
No PullRequest
|
||||
{{- else -}}
|
||||
{{- if .IsClosed -}}
|
||||
{{- if .PullRequest.HasMerged -}}
|
||||
{{- svg "octicon-git-merge" 16 "text purple" -}}
|
||||
{{- svg "octicon-git-merge" 16 "tw-text-purple" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-git-pull-request-closed" 16 "text red" -}}
|
||||
{{- svg "octicon-git-pull-request-closed" 16 "tw-text-red" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .PullRequest.IsWorkInProgress ctx -}}
|
||||
{{- svg "octicon-git-pull-request-draft" 16 "text grey" -}}
|
||||
{{- svg "octicon-git-pull-request-draft" 16 "tw-text-text-light" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-git-pull-request" 16 "text green" -}}
|
||||
{{- svg "octicon-git-pull-request" 16 "tw-text-green" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .IsClosed -}}
|
||||
{{- svg "octicon-issue-closed" 16 "text red" -}}
|
||||
{{- svg "octicon-issue-closed" 16 "tw-text-red" -}}
|
||||
{{- else -}}
|
||||
{{- svg "octicon-issue-opened" 16 "text green" -}}
|
||||
{{- svg "octicon-issue-opened" 16 "tw-text-green" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</span>
|
||||
</div>
|
||||
{{if .TotalTrackedTime}}
|
||||
<div class="text grey flex-text-block">
|
||||
<div class="tw-text-text-light flex-text-block">
|
||||
{{svg "octicon-clock" 16}}
|
||||
{{.TotalTrackedTime | Sec2Hour}}
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@
|
||||
{{end}}
|
||||
{{if ne .DeadlineUnix 0}}
|
||||
<span class="due-date flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date"}}">
|
||||
<span{{if .IsOverdue}} class="text red"{{end}}>
|
||||
<span{{if .IsOverdue}} class="tw-text-red"{{end}}>
|
||||
{{svg "octicon-calendar" 14}}
|
||||
{{DateUtils.AbsoluteShort .DeadlineUnix}}
|
||||
</span>
|
||||
@@ -138,7 +138,7 @@
|
||||
{{if or .Assignees .NumComments}}
|
||||
<div class="flex-item-trailing">
|
||||
{{if .Assignees}}
|
||||
<div class="text grey">
|
||||
<div class="tw-text-text-light">
|
||||
{{range .Assignees}}
|
||||
<a class="ui assignee tw-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
|
||||
{{ctx.AvatarUtils.Avatar . 20}}
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .NumComments}}
|
||||
<div class="text grey">
|
||||
<div class="tw-text-text-light">
|
||||
<a class="tw-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
|
||||
{{svg "octicon-comment" 16}}{{.NumComments}}
|
||||
</a>
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<div class="flex-item-header">
|
||||
<div class="flex-item-title">
|
||||
{{if and $.ShowRepoOwnerOnList .Owner}}
|
||||
<a class="text primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
|
||||
<a class="tw-text-primary name" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>/
|
||||
{{end}}
|
||||
<a class="text primary name" href="{{.Link}}">{{.Name}}</a>
|
||||
<a class="tw-text-primary name" href="{{.Link}}">{{.Name}}</a>
|
||||
<span class="label-list">
|
||||
{{if .IsArchived}}
|
||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a class="muted text black tw-font-semibold"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsTypeBot}} <span class="ui basic label tw-p-1 tw-align-baseline">bot</span>{{end}}
|
||||
<a class="muted tw-text-text tw-font-semibold"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsTypeBot}} <span class="ui basic label tw-p-1 tw-align-baseline">bot</span>{{end}}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<input type="hidden" name="action" value="block" />
|
||||
<input type="hidden" name="blockee" class="modal-blockee" />
|
||||
<div class="field">
|
||||
<label>{{ctx.Locale.Tr "user.block.user_to_block"}}: <span class="text red modal-blockee-name"></span></label>
|
||||
<label>{{ctx.Locale.Tr "user.block.user_to_block"}}: <span class="tw-text-red modal-blockee-name"></span></label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="block-note">{{ctx.Locale.Tr "user.block.note.title"}}</label>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="column">
|
||||
<div class="ui header tw-flex tw-items-center tw-break-anywhere">
|
||||
{{ctx.AvatarUtils.Avatar . 100}}
|
||||
<span class="text grey"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="tw-text-text-light"><a class="muted" href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="org-visibility">
|
||||
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
<div class="tw-mt-2">
|
||||
<a class="muted" href="{{.ContextUser.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "tw-mr-1"}}{{.NumFollowers}} {{ctx.Locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.ContextUser.HomeLink}}?tab=following">{{.NumFollowing}} {{ctx.Locale.Tr "user.following"}}</a>
|
||||
{{if .EnableFeed}}
|
||||
<a href="{{.ContextUser.HomeLink}}.rss"><i class="ui text grey tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a>
|
||||
<a href="{{.ContextUser.HomeLink}}.rss"><i class="ui tw-text-text-light tw-ml-2" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="extra content tw-break-anywhere">
|
||||
<ul>
|
||||
{{if .UserBlocking}}
|
||||
<li class="text red">{{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}</li>
|
||||
<li class="tw-text-red">{{svg "octicon-circle-slash"}} {{ctx.Locale.Tr "user.block.blocked"}}</li>
|
||||
{{if .UserBlocking.Note}}
|
||||
<li class="text small red">{{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}</li>
|
||||
<li class="tw-text-xs tw-text-red">{{ctx.Locale.Tr "user.block.note"}}: {{.UserBlocking.Note}}</li>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ContextUser.Location}}
|
||||
|
||||
Reference in New Issue
Block a user