From 584f36f0a179e9bc7b519fd83db5770db6a5044c 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. Signed-off-by: proton --- web_src/css/helpers.css | 5 +---- web_src/css/markup/content.css | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index cf2e73572..64621ac90 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -21,10 +21,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 419868a46..cb7823c05 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;