Skip to content

Commit

Permalink
feat: Adjust styling variables to allow for more control
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Schroeder committed Mar 13, 2024
1 parent 2d6c297 commit b0116ed
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../styles/scss-variables.scss';

.sidebar {
background-color: #fff;
background-color: var(--color-sidebar-background);
bottom: 0;
box-shadow: 0 0 50px 0 rgba(0,0,0,.25);
box-shadow: var(--sidebar-box-shadow);
box-sizing: border-box;
left: calc(-1 * var(--sidebar-width));
overflow-y: auto;
Expand All @@ -21,18 +21,20 @@

.headline {
font-size: 24px;
font-weight: var(--headline-font-weight);
margin: 20px 0;
text-transform: uppercase;
}

.subheadline {
font-size: 19px;
font-weight: var(--headline-font-weight);
margin: 20px 0;
text-transform: uppercase;
}

.codeWindow {
background: var(--color-gray-light);
background: var(--color-code-window-background);
font-size: 14px;
margin: 15px 0;
min-height: 200px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
.button {
background: var(--color-preload-background);
border-radius: 50%;
color: var(--color-button);
color: var(--color-button-text);
height: 80px;
padding: 16px;
position: relative;
Expand All @@ -49,7 +49,7 @@
.box {
background: var(--color-preload-background);
border-radius: var(--preload-border-radius);
color: var(--color-button);
color: var(--color-button-text);
max-width: var(--preload-max-width);
padding: var(--preload-box-padding);
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.pageHeader {
align-items: center;
background: #fff;
box-shadow: 0 3px 15px rgba(0,0,0,.2);
box-shadow: var(--header-box-shadow);
box-sizing: border-box;
display: flex;
height: var(--header-height);
Expand Down Expand Up @@ -41,6 +41,7 @@

.headline {
font-size: 30px;
font-weight: var(--headline-font-weight);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.projectPreview {
--project-preview-title-color: #fff;

background: #fff;
border-radius: 3px;
box-shadow: -1px 4px 50px 0 rgba(0,0,0,.5);
background: var(--color-preview-background);
border-radius: var(--project-preview-border-radius);
box-shadow: var(--project-preview-box-shadow);
overflow: hidden;
position: relative;
}

.image {
background-color: var(--color-gray);
background: var(--project-preview-image-background);
overflow: hidden;
position: relative;
width: 100%;
Expand Down Expand Up @@ -42,25 +42,26 @@
}

.controls {
background-color: #fff;
display: flex;
height: 80px;
justify-content: space-between;
padding: 20px;
}

.selectButton {
background: var(--color-gray-light);
border: 8px solid var(--color-gray);
background: var(--color-select-button-background);
background-clip: var(--select-button-background-clip);
border: var(--select-button-border);
border-radius: 25px;
height: var(--interaction-height);
outline: none;
padding: 0;
padding: var(--select-button-padding);
transition: background var(--animation-time) opacity var(--animation-time);
width: var(--interaction-height);

&.selected {
background: var(--color-interaction-active);
background-clip: var(--select-button-background-clip);
}

&:hover {
Expand All @@ -69,11 +70,11 @@
}

.button {
border-radius: 2px;
color: var(--color-button);
border-radius: var(--project-button-border-radius);
color: var(--color-button-text);

&:hover {
background-color: var(--color-interaction-active);
color: var(--color-button);
color: var(--color-button-text);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
}

.buttonLeft {
border-radius: calc(var(--interaction-height) / 2) 0 0 calc(var(--interaction-height) / 2);
border-radius: var(--settings-button-border-radius) 0 0 var(--settings-button-border-radius);
min-width: 50px;
}

.buttonCenter {
border-left: 1px solid var(--color-button);
border-left: 1px solid var(--color-button-text);
min-width: 50px;
}

.buttonRight {
border-left: 1px solid var(--color-button);
border-radius: 0 calc(var(--interaction-height) / 2) calc(var(--interaction-height) / 2) 0;
border-left: 1px solid var(--color-button-text);
border-radius: 0 var(--settings-button-border-radius) var(--settings-button-border-radius) 0;
min-width: 50px;
}

Expand Down
4 changes: 2 additions & 2 deletions libs/react-website/src/styles/common.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.button {
background-color: var(--color-gray);
color: var(--color-button);
background-color: var(--color-button-background);
color: var(--color-button-text);
display: inline-block;
font-family: var(--base-font-family);
font-size: var(--base-font-size);
Expand Down
3 changes: 2 additions & 1 deletion libs/react-website/src/styles/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

input,
select {
border: 1px solid #000;
border: 1px solid var(--base-font-color);
border-radius: 2px;
color: var(--base-font-color);
font-family: var(--base-font-family);
font-size: var(--base-font-size);
height: 30px;
Expand Down
3 changes: 2 additions & 1 deletion libs/react-website/src/styles/tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ body {
}

body {
color: var(--base-font-color);
font-family: var(--base-font-family);
font-size: var(--base-font-size);
font-weight: 400;
font-weight: var(--base-font-weight);
line-height: var(--base-line-height);
min-height: 100vh;
min-width: 320px;
Expand Down
25 changes: 21 additions & 4 deletions libs/react-website/src/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
@import './scss-variables.scss';

:root {
--color-gray: #a9a9a9;
--color-gray-light: #d3d3d3;
--color-button-background: #a9a9a9;
--color-button-text: #fff;
--color-code-window-background: #d3d3d3;
--color-interaction-active: #003055;
--color-button: #fff;
--color-overview-background: transparent;
--color-preview-background: #fff;
--color-preload-background: rgba(0, 0, 0, 0.8);
--color-select-button-background: #d3d3d3;
--color-sidebar-background: #fff;

--base-font-color: #000;
--base-font-family: 'Open Sans', Helvetica, Arial, sans-serif;
--base-font-size: 16px;
--base-font-weight: 400;
--base-line-height: 1.5;
--headline-font-weight: 400;

--header-box-shadow: 0 3px 15px rgba(0,0,0,.2);
--header-height: 80px;
--sidebar-width: 300px;
--interaction-height: 40px;
--preload-border-radius: 10px;
--preload-box-padding: 22px;
--preload-max-width: 390px;
--project-button-border-radius: 2px;
--project-preview-border-radius: 3px;
--project-preview-box-shadow: -1px 4px 50px 0 rgba(0,0,0,.5);
--project-preview-image-background: #a9a9a9;
--select-button-border: 8px solid #a9a9a9;
--select-button-background-clip: initial;
--select-button-padding: 0;
--settings-button-border-radius: calc(var(--interaction-height) / 2);
--sidebar-box-shadow: 0 0 50px 0 rgba(0,0,0,.25);
--sidebar-width: 300px;

--animation-time: 0.3s;
}
Expand Down
1 change: 1 addition & 0 deletions libs/react-website/src/views/overview/overview.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '../../styles/scss-variables.scss';

.pageContent {
background-color: var(--color-overview-background);
padding-left: 0;
padding-top: var(--header-height);
transition: padding-left var(--animation-time);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
background-color: transparent;
flex: 0 0 auto;
font-size: var(--ui-font-size);
height: var(--ui-size-button);
min-height: var(--ui-size-button);
padding: var(--ui-size-select-list-entry-padding);
}
}

Expand Down
3 changes: 3 additions & 0 deletions libs/viewer-ui/src/lib/viewer-ui.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
--ui-color-loading-indicator: #005cb1;
--ui-font-family: 'Open Sans', Arial, Helvetica, sans-serif;
--ui-font-size: 16px;
--ui-font-weight: 400;
--ui-size-animation-bar-bottom: 80px;
--ui-size-animation-bar-handle: 24px;
--ui-size-animation-bar-height: 4px;
Expand All @@ -34,12 +35,14 @@
--ui-size-menu-width: 270px;
--ui-size-select-list-bottom: 95px;
--ui-size-select-list-width: 310px;
--ui-size-select-list-entry-padding: 10px;
--ui-size-select-step-button-width: 25px;

box-sizing: border-box;
color: var(--ui-color-font);
font-family: var(--ui-font-family);
font-size: var(--ui-font-size);
font-weight: var(--ui-font-weight);
height: 100%;
left: 0;
overflow: hidden;
Expand Down

0 comments on commit b0116ed

Please sign in to comment.