From 91491a78c544650819e2e794d0ba1da62d6ce6b5 Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Sat, 27 Apr 2024 14:53:16 +0530 Subject: [PATCH] style: improve styling --- src/components/appBar/appBar.module.scss | 8 +++++++- src/components/appBar/appBar.tsx | 10 +--------- src/components/card/card.module.scss | 1 - src/routes/library/index.tsx | 2 +- src/routes/library/library.module.scss | 3 ++- src/styles/global.scss | 2 +- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/components/appBar/appBar.module.scss b/src/components/appBar/appBar.module.scss index 52332db..ecc4399 100644 --- a/src/components/appBar/appBar.module.scss +++ b/src/components/appBar/appBar.module.scss @@ -14,7 +14,7 @@ padding: 0.5em; background: rgb(0 0 0 / 0.4); backdrop-filter: blur(40px); - box-shadow: 0 0 15px rgb(0 0 0 / 0.2); + box-shadow: 0 0 25px rgb(0 0 0 / 0.45); } } &-avatar { @@ -63,6 +63,12 @@ } .library-drawer{ + width: 20em; + margin: 1.4em; + height: calc(100vh - 2.8em) !important; + border-radius: 20px; + overflow-x: hidden; + overflow-y: auto; .library-drawer-item{ position: relative; overflow: hidden; diff --git a/src/components/appBar/appBar.tsx b/src/components/appBar/appBar.tsx index f817ebd..5a15208 100644 --- a/src/components/appBar/appBar.tsx +++ b/src/components/appBar/appBar.tsx @@ -305,15 +305,7 @@ export const AppBar = () => { open={showDrawer} PaperProps={{ className: "glass library-drawer", - style: { - width: "20em", - margin: "1.4em", - height: "calc(100vh - 2.8em)", - borderRadius: "20px", - overflowX: "hidden", - overflowY: "auto", - border: "1.2px solid rgb(255 255 255 / 0.2)", - }, + elevation: 6, }} className="library-drawer" onClose={() => setShowDrawer(false)} diff --git a/src/components/card/card.module.scss b/src/components/card/card.module.scss index c640916..aa280a7 100644 --- a/src/components/card/card.module.scss +++ b/src/components/card/card.module.scss @@ -31,7 +31,6 @@ overflow: hidden; height: auto; z-index: 0; - border: 1.2px solid rgb(255 255 255 / 0.05); &.thumb{ aspect-ratio: 1.777777; diff --git a/src/routes/library/index.tsx b/src/routes/library/index.tsx index f392bd8..5e10d40 100644 --- a/src/routes/library/index.tsx +++ b/src/routes/library/index.tsx @@ -360,7 +360,7 @@ const LibraryView = () => { const scrollTrigger = useScrollTrigger({ disableHysteresis: true, - threshold: 0, + threshold: 50, }); const [backdropItems, setBackdropItems] = useState([]); diff --git a/src/routes/library/library.module.scss b/src/routes/library/library.module.scss index 2f5c13a..3f418a1 100644 --- a/src/routes/library/library.module.scss +++ b/src/routes/library/library.module.scss @@ -70,11 +70,12 @@ z-index: 1000; &.scrolling { background: rgb(0 0 0 / 0.4) !important; + box-shadow: 0 0 25px rgb(0 0 0 / 0.45); top: 1em; } } &-options { - padding: 0.5em 1.2em; + padding: 0.5em 0.75em; gap: 0.5em; overflow: hidden; display: flex; diff --git a/src/styles/global.scss b/src/styles/global.scss index afe8300..ef523cc 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -292,6 +292,6 @@ h1 { } .glass { - background: rgb(0 0 0 / 0.1) !important; + background: rgb(0 0 0 / 0.2) !important; backdrop-filter: blur(40px); } \ No newline at end of file