From abc4ca38ee81eb38488ce45ceb7e0f500f190d99 Mon Sep 17 00:00:00 2001 From: braddf Date: Mon, 11 Nov 2024 17:38:19 +0000 Subject: [PATCH] fix ugly scrollbars bug --- .../charts/delta-view/delta-view-chart.tsx | 6 ++--- .../solar-site-view/solar-site-chart.tsx | 10 ++++---- .../components/side-layout/index.tsx | 2 +- apps/nowcasting-app/styles/globals.css | 25 +++++++++++++++++++ 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/apps/nowcasting-app/components/charts/delta-view/delta-view-chart.tsx b/apps/nowcasting-app/components/charts/delta-view/delta-view-chart.tsx index 268b7779..0c34e6b9 100644 --- a/apps/nowcasting-app/components/charts/delta-view/delta-view-chart.tsx +++ b/apps/nowcasting-app/components/charts/delta-view/delta-view-chart.tsx @@ -374,9 +374,9 @@ const DeltaChart: FC = ({ className, combinedData, combinedErro )}
{!hasGspPvInitialForSelectedTime && ( diff --git a/apps/nowcasting-app/components/charts/solar-site-view/solar-site-chart.tsx b/apps/nowcasting-app/components/charts/solar-site-view/solar-site-chart.tsx index ae047465..573e433a 100644 --- a/apps/nowcasting-app/components/charts/solar-site-view/solar-site-chart.tsx +++ b/apps/nowcasting-app/components/charts/solar-site-view/solar-site-chart.tsx @@ -324,30 +324,30 @@ const SolarSiteChart: FC<{
)} -
+
= ({ "focus:outline-none h-full text-white justify-between flex flex-col bg-mapbox-black-500 z-20 " } > -
{children}
+
{children}
setIsOpen((o) => !o)} /> diff --git a/apps/nowcasting-app/styles/globals.css b/apps/nowcasting-app/styles/globals.css index 2e25745e..b8834b20 100644 --- a/apps/nowcasting-app/styles/globals.css +++ b/apps/nowcasting-app/styles/globals.css @@ -114,3 +114,28 @@ overflow: hidden; visibility: hidden; } + +/**************/ +/* SCROLLBARS */ +/**************/ + +/* Works on Firefox */ +* { + scrollbar-width: thin; + scrollbar-color: theme(colors.mapbox-black.700) theme(colors.mapbox-black.600); +} + +/* Works on Chrome, Edge, and Safari */ +*::-webkit-scrollbar { + width: 12px; +} + +*::-webkit-scrollbar-track { + background: theme(colors.mapbox-black.600); +} + +*::-webkit-scrollbar-thumb { + background-color: theme(colors.mapbox-black.700); + border-radius: 20px; + border: 3px solid theme(colors.mapbox-black.600); +}