From 2a11de757164055ae219589dbbfdbb49575b2d9f Mon Sep 17 00:00:00 2001 From: Banzobotic <78510207+Banzobotic@users.noreply.github.com> Date: Sun, 20 Aug 2023 21:28:53 +0100 Subject: [PATCH 1/4] Fix clicking the edges of clickables --- lib/assets/styles/classes.scss | 32 ++++++++++++++++++++++++++++++ lib/components/base/Pagination.vue | 4 ++++ 2 files changed, 36 insertions(+) diff --git a/lib/assets/styles/classes.scss b/lib/assets/styles/classes.scss index 89552580..935d4848 100644 --- a/lib/assets/styles/classes.scss +++ b/lib/assets/styles/classes.scss @@ -230,10 +230,30 @@ a, .clickable { transition: opacity 0.5s ease-in-out, filter 0.2s ease-in-out, scale 0.05s ease-in-out, outline 0.2s ease-in-out; + + position: relative; + + &:not([rel~=ugc]) { + pointer-events: none; + } &:active:not(&:disabled) { scale: 0.95; } + + &:not([rel~=ugc])::before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + pointer-events: all; + } + + &:active::before { + scale: 1.1; + } } .button-base { @@ -394,6 +414,10 @@ a, background: none; box-shadow: none; } + + &::before { + border-radius: var(--radius-md); + } } .btn-group { @@ -489,6 +513,10 @@ a, } } + &::before { + border-radius: var(--radius-lg); + } + // TODO: Add back later //&.warning { // border-left: 0.5rem solid var(--color-warning-banner-side); @@ -687,6 +715,10 @@ a, &:hover &:focus { background: var(--color-button-bg); } + + &::before { + border-radius: var(--radius-max); + } } // TOOLTIPS diff --git a/lib/components/base/Pagination.vue b/lib/components/base/Pagination.vue index df83a8c4..6f899e89 100644 --- a/lib/components/base/Pagination.vue +++ b/lib/components/base/Pagination.vue @@ -152,6 +152,10 @@ a { transform: scale(0.95); filter: brightness(0.8); } + + &::before { + border-radius: 2rem; + } } .has-icon { From 810cf9ab2cbda7c98f3475475d27bdfe00d41a73 Mon Sep 17 00:00:00 2001 From: Banzobotic <78510207+Banzobotic@users.noreply.github.com> Date: Sun, 20 Aug 2023 21:44:36 +0100 Subject: [PATCH 2/4] Use better exception for markdown Now more readable, and doesn't affect other external links such as in sidebar-card --- lib/assets/styles/classes.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/assets/styles/classes.scss b/lib/assets/styles/classes.scss index 935d4848..13197b0b 100644 --- a/lib/assets/styles/classes.scss +++ b/lib/assets/styles/classes.scss @@ -233,7 +233,7 @@ a, position: relative; - &:not([rel~=ugc]) { + &:not(.markdown-body a) { pointer-events: none; } @@ -241,7 +241,7 @@ a, scale: 0.95; } - &:not([rel~=ugc])::before { + &:not(.markdown-body a)::before { content: ''; position: absolute; top: 0; From 5e25a4a00e49a726cf0a05956a53f73fb4be58fb Mon Sep 17 00:00:00 2001 From: Banzobotic <78510207+Banzobotic@users.noreply.github.com> Date: Sun, 20 Aug 2023 23:16:06 +0100 Subject: [PATCH 3/4] Simplify code and avoid breaking change --- lib/assets/styles/classes.scss | 13 +------------ lib/components/base/Pagination.vue | 4 ---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/assets/styles/classes.scss b/lib/assets/styles/classes.scss index 13197b0b..bfe55674 100644 --- a/lib/assets/styles/classes.scss +++ b/lib/assets/styles/classes.scss @@ -249,6 +249,7 @@ a, left: 0; right: 0; pointer-events: all; + border-radius: inherit; } &:active::before { @@ -414,10 +415,6 @@ a, background: none; box-shadow: none; } - - &::before { - border-radius: var(--radius-md); - } } .btn-group { @@ -513,10 +510,6 @@ a, } } - &::before { - border-radius: var(--radius-lg); - } - // TODO: Add back later //&.warning { // border-left: 0.5rem solid var(--color-warning-banner-side); @@ -715,10 +708,6 @@ a, &:hover &:focus { background: var(--color-button-bg); } - - &::before { - border-radius: var(--radius-max); - } } // TOOLTIPS diff --git a/lib/components/base/Pagination.vue b/lib/components/base/Pagination.vue index 6f899e89..df83a8c4 100644 --- a/lib/components/base/Pagination.vue +++ b/lib/components/base/Pagination.vue @@ -152,10 +152,6 @@ a { transform: scale(0.95); filter: brightness(0.8); } - - &::before { - border-radius: 2rem; - } } .has-icon { From 5be3aec7d4cdf3a18851247288783b1b844ce623 Mon Sep 17 00:00:00 2001 From: Banzobotic <78510207+Banzobotic@users.noreply.github.com> Date: Sun, 20 Aug 2023 23:33:48 +0100 Subject: [PATCH 4/4] whitespace fix --- lib/assets/styles/classes.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/assets/styles/classes.scss b/lib/assets/styles/classes.scss index bfe55674..588ed693 100644 --- a/lib/assets/styles/classes.scss +++ b/lib/assets/styles/classes.scss @@ -230,7 +230,7 @@ a, .clickable { transition: opacity 0.5s ease-in-out, filter 0.2s ease-in-out, scale 0.05s ease-in-out, outline 0.2s ease-in-out; - + position: relative; &:not(.markdown-body a) {