diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-08 17:53:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 11:53:56 +0200 |
commit | cc00fd50f31c819bf575cbf4a48a4bf8bf2a340e (patch) | |
tree | 3d80d0855be0c7d55aa575a906c49bb4590b5c01 /web_src | |
parent | 62f3c0fe76f215cbe88b1a76408b09d74ad14f92 (diff) | |
download | gitea-cc00fd50f31c819bf575cbf4a48a4bf8bf2a340e.tar.gz gitea-cc00fd50f31c819bf575cbf4a48a4bf8bf2a340e.zip |
Clarify "text-align" CSS helpers, fix clone button padding (#25763)
Changes:
* Rename gt-tl/gt-tc/gt-tr to gt-text-left/gt-text-center/gt-text-right
* The gt-ab and gt-br-0 are removed because they are not needed anymore
* Fix the clone dropdown button padding by ":not(.icon)"
Before:
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/eb030633-622c-4ca7-8e88-ce010d9f51a6)
</details>
After:
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/64c09403-bf21-439c-88f1-780b34ccab6b)
</details>
Fixes #25758
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/css/helpers.css | 9 | ||||
-rw-r--r-- | web_src/css/repo.css | 3 | ||||
-rw-r--r-- | web_src/js/features/common-global.js | 2 | ||||
-rw-r--r-- | web_src/js/features/repo-issue-content.js | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index a24d35e979..73f2ebe79b 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -8,10 +8,6 @@ Gitea's private styles use `g-` prefix. .gt-dif { display: inline-flex !important; } .gt-dib { display: inline-block !important; } .gt-ac { align-items: center !important; } -.gt-ab { align-items: baseline !important; } -.gt-tc { text-align: center !important; } -.gt-tl { text-align: left !important; } -.gt-tr { text-align: right !important; } /* TODO: rename these to "gt-text-right", etc. there are only a few */ .gt-jc { justify-content: center !important; } .gt-js { justify-content: flex-start !important; } .gt-je { justify-content: flex-end !important; } @@ -22,7 +18,6 @@ Gitea's private styles use `g-` prefix. .gt-vm { vertical-align: middle !important; } .gt-w-100 { width: 100% !important; } .gt-h-100 { height: 100% !important; } -.gt-br-0 { border-radius: 0 !important; } .gt-mono { font-family: var(--fonts-monospace) !important; @@ -90,6 +85,10 @@ Gitea's private styles use `g-` prefix. .gt-float-right { float: right !important; } .gt-clear-both { clear: both !important; } +.gt-text-center { text-align: center !important; } +.gt-text-left { text-align: left !important; } +.gt-text-right { text-align: right !important; } + .gt-font-light { font-weight: var(--font-weight-light) !important; } .gt-font-normal { font-weight: var(--font-weight-normal) !important; } .gt-font-medium { font-weight: var(--font-weight-medium) !important; } diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 55d10098e9..3862436701 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -190,6 +190,7 @@ .repository #clone-panel #repo-clone-url { width: 320px; + border-radius: 0; } @media (min-width: 768px) and (max-width: 991.98px) { @@ -2655,7 +2656,7 @@ height: 30px; } -.repo-button-row .button.dropdown { +.repo-button-row .button.dropdown:not(.icon) { padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */ } diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index a99b29141d..8ee5ce25bf 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -237,7 +237,7 @@ export function initGlobalDropzone() { // Create a "Copy Link" element, to conveniently copy the image // or file link as Markdown to the clipboard const copyLinkElement = document.createElement('div'); - copyLinkElement.className = 'gt-tc'; + copyLinkElement.className = 'gt-text-center'; // The a element has a hardcoded cursor: pointer because the default is overridden by .dropzone copyLinkElement.innerHTML = `<a href="#" style="cursor: pointer;">${svg('octicon-copy', 14, 'copy link')} Copy link</a>`; copyLinkElement.addEventListener('click', (e) => { diff --git a/web_src/js/features/repo-issue-content.js b/web_src/js/features/repo-issue-content.js index fc916aea19..3ada166c5b 100644 --- a/web_src/js/features/repo-issue-content.js +++ b/web_src/js/features/repo-issue-content.js @@ -24,7 +24,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH </div> </div> </div> - <div class="comment-diff-data gt-tl gt-p-3 is-loading"></div> + <div class="comment-diff-data gt-text-left gt-p-3 is-loading"></div> </div>`); $dialog.appendTo($('body')); $dialog.find('.dialog-header-options').dropdown({ |