From 1617351aecd59ee4938098a55bc2ed5bc75327db Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:12:13 +0000 Subject: [PATCH 1/3] init --- src/main/scss/base/_typography.scss | 11 +++++++- .../scss/components/_command-palette.scss | 28 +++++++++++++------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/main/scss/base/_typography.scss b/src/main/scss/base/_typography.scss index 0dceec4624a6..2f26ddb7fb0c 100644 --- a/src/main/scss/base/_typography.scss +++ b/src/main/scss/base/_typography.scss @@ -1,4 +1,5 @@ @use "../abstracts/mixins"; +@use "../base/breakpoints"; body, p { @@ -16,11 +17,19 @@ button { table, td, th, -form, +form { + font-size: var(--font-size-sm); +} + input, textarea, select { font-size: var(--font-size-sm); + + /* stylelint-disable-next-line media-query-no-invalid */ + @media (max-width: breakpoints.$tablet-breakpoint) { + font-size: var(--font-size-base); + } } // Reset monospaced font-size, because browsers reduce it by default to ~81% diff --git a/src/main/scss/components/_command-palette.scss b/src/main/scss/components/_command-palette.scss index ebd634cb9ce6..501b104c4998 100644 --- a/src/main/scss/components/_command-palette.scss +++ b/src/main/scss/components/_command-palette.scss @@ -1,10 +1,11 @@ @use "../abstracts/mixins"; +@use "../base/breakpoints"; .jenkins-command-palette__dialog { background: none; border: none; - height: 100vw !important; - max-height: 100vh !important; + height: 100dvh !important; + max-height: 100dvh !important; width: 100vw !important; max-width: 100vw !important; margin: 0 !important; @@ -12,7 +13,8 @@ user-select: none; &::backdrop { - background: var(--command-palette-backdrop-background); + //background: var(--command-palette-backdrop-background); + background: red; backdrop-filter: contrast(0.7) brightness(0.9) saturate(1.25) blur(3px); animation: jenkins-dialog-backdrop-animate-in 0.1s linear; } @@ -47,28 +49,38 @@ } .jenkins-command-palette__wrapper { + --inset: 15vh; + width: 100%; height: 100%; - max-height: 100vh; + max-height: 100dvh; overflow: scroll; - padding-top: 20vh; + padding-top: var(--inset); + + /* stylelint-disable-next-line media-query-no-invalid */ + @media (max-width: breakpoints.$tablet-breakpoint) { + --inset: 10vh; + } } .jenkins-command-palette { position: relative; width: 50vw; - min-width: 400px; max-width: 650px; color: var(--text-color); pointer-events: auto; - margin: 0 auto 20vh; + margin: 0 auto var(--inset); + + @media (max-width: breakpoints.$tablet-breakpoint) { + width: calc(100% - (var(--section-padding) * 2)); + } &__search { --search-bar-height: 3rem !important; background: transparent; box-shadow: var(--command-palette-inset-shadow); - margin-bottom: 1.5rem; + margin-bottom: var(--section-padding); border-radius: 1rem; transition: var(--standard-transition); z-index: 10; From 2ffe591feae1b3dc045e060252901b7f96826860 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:14:25 +0000 Subject: [PATCH 2/3] Update _command-palette.scss --- src/main/scss/components/_command-palette.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/scss/components/_command-palette.scss b/src/main/scss/components/_command-palette.scss index 501b104c4998..8bf3e2aa9d77 100644 --- a/src/main/scss/components/_command-palette.scss +++ b/src/main/scss/components/_command-palette.scss @@ -13,8 +13,7 @@ user-select: none; &::backdrop { - //background: var(--command-palette-backdrop-background); - background: red; + background: var(--command-palette-backdrop-background); backdrop-filter: contrast(0.7) brightness(0.9) saturate(1.25) blur(3px); animation: jenkins-dialog-backdrop-animate-in 0.1s linear; } From 050f6f70406a27f1c7d885c8a43e46283ddad083 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:24:08 +0000 Subject: [PATCH 3/3] Update _command-palette.scss --- src/main/scss/components/_command-palette.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scss/components/_command-palette.scss b/src/main/scss/components/_command-palette.scss index 8bf3e2aa9d77..beeb436547db 100644 --- a/src/main/scss/components/_command-palette.scss +++ b/src/main/scss/components/_command-palette.scss @@ -70,6 +70,7 @@ pointer-events: auto; margin: 0 auto var(--inset); + /* stylelint-disable-next-line media-query-no-invalid */ @media (max-width: breakpoints.$tablet-breakpoint) { width: calc(100% - (var(--section-padding) * 2)); }