From 49d2ea99e18d013983b501f4abec9e0c8dd8bfe5 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 24 Apr 2024 21:12:37 +0300 Subject: [PATCH 1/5] move squircle to only to active and hover states --- src/frontend/styles/components/sidebar.pcss | 7 +++++-- src/frontend/styles/vars.pcss | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/styles/components/sidebar.pcss b/src/frontend/styles/components/sidebar.pcss index 7ce04cae..ac045197 100644 --- a/src/frontend/styles/components/sidebar.pcss +++ b/src/frontend/styles/components/sidebar.pcss @@ -182,13 +182,16 @@ transition-property: background-color; transition-duration: 0.1s; - @apply --squircle; - &--selected { border-radius: 8px; /* border using box-shadow which doesn't increase the height */ box-shadow: 0 0 0 2px rgba(147, 166, 233, 0.5) inset; } + + &--active, + &--hover { + @apply --squircle; + } } &__section-title > span, diff --git a/src/frontend/styles/vars.pcss b/src/frontend/styles/vars.pcss index 2af7f66b..b1ed001c 100644 --- a/src/frontend/styles/vars.pcss +++ b/src/frontend/styles/vars.pcss @@ -138,6 +138,7 @@ --squircle { border-radius: 8px; + @supports(-webkit-mask-box-image: url('')){ border-radius: 0; -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10.3872C0 1.83334 1.83334 0 10.3872 0H13.6128C22.1667 0 24 1.83334 24 10.3872V13.6128C24 22.1667 22.1667 24 13.6128 24H10.3872C1.83334 24 0 22.1667 0 13.6128V10.3872Z' fill='black'/%3E%3C/svg%3E%0A") 48% 41% 37.9% 53.3%;; From 78ae421d57ccb59195475a68579426823323678f Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 24 Apr 2024 21:15:07 +0300 Subject: [PATCH 2/5] fix hover --- src/frontend/styles/components/sidebar.pcss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/styles/components/sidebar.pcss b/src/frontend/styles/components/sidebar.pcss index ac045197..04f6f83a 100644 --- a/src/frontend/styles/components/sidebar.pcss +++ b/src/frontend/styles/components/sidebar.pcss @@ -189,7 +189,7 @@ } &--active, - &--hover { + &:hover { @apply --squircle; } } From 3016d219acca59700da854f8a7b53fb4fc877313 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 24 Apr 2024 21:19:25 +0300 Subject: [PATCH 3/5] fix squircle in header --- src/frontend/styles/components/header.pcss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/styles/components/header.pcss b/src/frontend/styles/components/header.pcss index 0b43e9eb..3c627205 100644 --- a/src/frontend/styles/components/header.pcss +++ b/src/frontend/styles/components/header.pcss @@ -40,7 +40,10 @@ html { @media (--not-mobile) { padding: 4px 10px; - @apply --squircle; + + &:hover { + @apply --squircle; + } } &:hover { From 2dc08f6885822cca4503e4487bb04d5202cf372f Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 24 Apr 2024 21:22:00 +0300 Subject: [PATCH 4/5] fix toc --- src/frontend/styles/components/table-of-content.pcss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/styles/components/table-of-content.pcss b/src/frontend/styles/components/table-of-content.pcss index ab3c9211..a3f56743 100644 --- a/src/frontend/styles/components/table-of-content.pcss +++ b/src/frontend/styles/components/table-of-content.pcss @@ -31,7 +31,10 @@ gap: 2px; &-item { - @apply --squircle; + &:hover, + &--active { + @apply --squircle; + } &:hover { background-color: var(--color-link-hover); From 783e5a0d58c0746083dc6ae3006b638d71639056 Mon Sep 17 00:00:00 2001 From: Peter Savchenko Date: Wed, 24 Apr 2024 21:30:41 +0300 Subject: [PATCH 5/5] rm redundant line --- src/frontend/styles/vars.pcss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/frontend/styles/vars.pcss b/src/frontend/styles/vars.pcss index b1ed001c..2af7f66b 100644 --- a/src/frontend/styles/vars.pcss +++ b/src/frontend/styles/vars.pcss @@ -138,7 +138,6 @@ --squircle { border-radius: 8px; - @supports(-webkit-mask-box-image: url('')){ border-radius: 0; -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10.3872C0 1.83334 1.83334 0 10.3872 0H13.6128C22.1667 0 24 1.83334 24 10.3872V13.6128C24 22.1667 22.1667 24 13.6128 24H10.3872C1.83334 24 0 22.1667 0 13.6128V10.3872Z' fill='black'/%3E%3C/svg%3E%0A") 48% 41% 37.9% 53.3%;;