From 3c2406a2f3008431d0a4956d7e8f68f7352e0613 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 11 May 2024 16:28:56 +0200 Subject: [PATCH] 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. --- web_src/css/helpers.css | 5 +---- web_src/css/markup/content.css | 5 +---- web_src/css/modules/dimmer.css | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 4d12dfaea2f..60ecd7db72f 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 6ba4e400726..3eb40eaf291 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 a552d103e53..89248213707 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;