From b0b418d699eaf0666be5d15c110863e9e127e92c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 28 Jun 2022 10:47:41 -0500 Subject: [PATCH 1/3] BackgroundShapes: use a CSS linear gradient --- .../ui/components/background_shapes.tsx | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/app/soapbox/features/ui/components/background_shapes.tsx b/app/soapbox/features/ui/components/background_shapes.tsx index 2f9427eba..69bf29072 100644 --- a/app/soapbox/features/ui/components/background_shapes.tsx +++ b/app/soapbox/features/ui/components/background_shapes.tsx @@ -9,28 +9,7 @@ interface IBackgroundShapes { /** Gradient that appears in the background of the UI. */ const BackgroundShapes: React.FC = ({ position = 'fixed' }) => (
-
- - - - - - - - - - - - - - - - - - - - -
+
); From 825f5566a01d996c201f16ec902ef680c1a5a303 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 28 Jun 2022 14:18:15 -0400 Subject: [PATCH 2/3] Add CSS class with variables --- .../features/ui/components/background_shapes.tsx | 2 +- app/styles/application.scss | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/ui/components/background_shapes.tsx b/app/soapbox/features/ui/components/background_shapes.tsx index 69bf29072..af9393f3b 100644 --- a/app/soapbox/features/ui/components/background_shapes.tsx +++ b/app/soapbox/features/ui/components/background_shapes.tsx @@ -9,7 +9,7 @@ interface IBackgroundShapes { /** Gradient that appears in the background of the UI. */ const BackgroundShapes: React.FC = ({ position = 'fixed' }) => (
-
+
); diff --git a/app/styles/application.scss b/app/styles/application.scss index 73622665e..9bed26cec 100644 --- a/app/styles/application.scss +++ b/app/styles/application.scss @@ -93,6 +93,18 @@ /* stylelint-disable-next-line unit-no-unknown */ height: 100dvh; } + + .bg-gradient { + background: linear-gradient( + 112deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0) 20%, + rgba(var(--color-gradient-start) / 0.1) 30%, + rgba(var(--color-gradient-end) / 0.1) 70%, + rgba(0, 0, 0, 0) 80%, + rgba(0, 0, 0, 0) 100% + ); + } } @import 'forms'; From e3d976a2e708758707ef8ad38beb45e70b2fd84b Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 28 Jun 2022 14:26:59 -0400 Subject: [PATCH 3/3] Account for smaller screens --- .../features/ui/components/background_shapes.tsx | 2 +- app/styles/application.scss | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/ui/components/background_shapes.tsx b/app/soapbox/features/ui/components/background_shapes.tsx index af9393f3b..50bdef350 100644 --- a/app/soapbox/features/ui/components/background_shapes.tsx +++ b/app/soapbox/features/ui/components/background_shapes.tsx @@ -9,7 +9,7 @@ interface IBackgroundShapes { /** Gradient that appears in the background of the UI. */ const BackgroundShapes: React.FC = ({ position = 'fixed' }) => (
-
+
); diff --git a/app/styles/application.scss b/app/styles/application.scss index 9bed26cec..1dcd2efd5 100644 --- a/app/styles/application.scss +++ b/app/styles/application.scss @@ -94,7 +94,7 @@ height: 100dvh; } - .bg-gradient { + .bg-gradient-lg { background: linear-gradient( 112deg, rgba(0, 0, 0, 0) 0%, @@ -105,6 +105,14 @@ rgba(0, 0, 0, 0) 100% ); } + + .bg-gradient-sm { + background: linear-gradient( + 112deg, + rgba(var(--color-gradient-start) / 0.1) 0%, + rgba(var(--color-gradient-end) / 0.1) 50% + ); + } } @import 'forms';