From: silverwind Date: Sat, 11 May 2024 14:28:56 +0000 (+0200) Subject: Use CSS `inset` shorthand (#30939) X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3c2406a2f3008431d0a4956d7e8f68f7352e0613;p=gitea.git Use CSS `inset` shorthand (#30939) Use [inset](https://developer.mozilla.org/en-US/docs/Web/CSS/inset) shorthand instead of longhands. There may be more cases but these ones I was able to definitely identify. --- diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 4d12dfaea2..60ecd7db72 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -20,10 +20,7 @@ Gitea's private styles use `g-` prefix. .g-table-auto-ellipsis td.auto-ellipsis span { position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; + inset: 0; padding: inherit; white-space: nowrap; overflow: hidden; diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css index 6ba4e40072..3eb40eaf29 100644 --- a/web_src/css/markup/content.css +++ b/web_src/css/markup/content.css @@ -204,10 +204,7 @@ .markup input[type="checkbox"]::after { position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; + inset: 0; pointer-events: none; background: var(--color-text); mask-size: cover; diff --git a/web_src/css/modules/dimmer.css b/web_src/css/modules/dimmer.css index a552d103e5..8924821370 100644 --- a/web_src/css/modules/dimmer.css +++ b/web_src/css/modules/dimmer.css @@ -3,10 +3,7 @@ .ui.dimmer { position: fixed; display: none; - top: 0; - left: 0; - right: 0; - bottom: 0; + inset: 0; background: var(--color-overlay-backdrop); opacity: 0; z-index: 1000;