From 4d5b4a4b36b36393dcf2aa8ce1458c5d20871633 Mon Sep 17 00:00:00 2001 From: HesterG Date: Fri, 24 Feb 2023 22:29:49 +0800 Subject: [PATCH 1/2] Fix height for sticky head on large screen on PR page (#23111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Right now on the PR 'File Change' Tab, the file title header sticky to the top on large screens has wrong height, resulting in wrong ui behavior when scrolling down. This PR is to fix this. Before: 截屏2023-02-24 17 12 29 After: 截屏2023-02-24 21 10 12 --- web_src/less/_repository.less | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 954577c87895c..99746c43001cd 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -3218,17 +3218,9 @@ td.blob-excerpt { .ui.attached.header.diff-file-header { &.sticky-2nd-row { position: sticky; - top: 46px; + top: 77px; z-index: 7; - - @media @mediaMd { - top: 77px; - } - - @media @mediaSm { - top: 77px; - } - + @media (max-width: 480px) { position: static; } From c16e737d15dacbd1a7ba4f35adc2a0c37ceb2a7f Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Fri, 24 Feb 2023 15:41:15 +0000 Subject: [PATCH 2/2] placate linter Signed-off-by: Andrew Thornton --- web_src/less/_repository.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 99746c43001cd..09b8002a8986e 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -3220,7 +3220,7 @@ td.blob-excerpt { position: sticky; top: 77px; z-index: 7; - + @media (max-width: 480px) { position: static; }