Skip to content

Commit

Permalink
chore: css: remove redundant font stack sass and use semantic variable (
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilgore-eightfold authored Jul 10, 2023
1 parent 509980c commit 5f014ec
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/components/Dialog/BaseDialog/base-dialog.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $dialog-body-bottom-shadow: inset 0 -11px 8px -10px

align-items: center;
display: flex;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
justify-content: center;

.dialog {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialog/dialog.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.dialog {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
transform-origin: 50% 50%;
width: 352px;

Expand Down
4 changes: 2 additions & 2 deletions src/components/Dropdown/dropdown.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.main-wrapper {
display: inline-block;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
white-space: nowrap;

.reference-wrapper {
Expand All @@ -24,7 +24,7 @@
padding: $space-xs;
box-shadow: $shadow-object-m;
border-radius: $border-radius-l; // TODO: ENG-46367 Add DropdownSize type and handle mapping via trigger size, then L 24px, M 20px, S 16px border-radius determined by size of the trigger.
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
min-width: 200px;
opacity: 0;
white-space: normal;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form/form.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
&-label {
display: inline-block;
flex-grow: 0;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
overflow: hidden;
white-space: nowrap;
text-align: right;
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoBar/infoBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
border-radius: var(--info-bar-border-radius);
color: var(--info-bar-text-color);
display: flex;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
gap: $space-m;
padding: $space-ml;
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Inputs/input.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
border-radius: $border-radius-m;
box-sizing: border-box;
color: var(--input-text-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-3;
line-height: $text-line-height-1;
min-width: 120px;
Expand Down Expand Up @@ -966,7 +966,7 @@
border-radius: $border-radius-m;
box-sizing: border-box;
color: var(--input-text-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-3;
line-height: $text-line-height-4;
min-height: calc($text-line-height-4 + $space-xxxs + $space-xs * 2);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Label/label.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

.text-style {
color: var(--text-primary-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);

&.large {
font-size: $text-font-size-5;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
flex: auto;
flex-direction: column;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
height: 100%;

/* fix firefox can't set height smaller than content on flex item */
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/link.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.link-style {
cursor: pointer;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-weight: $text-font-weight-semibold;
font-size: $text-font-size-2;
width: fit-content;
Expand Down
2 changes: 1 addition & 1 deletion src/components/List/list.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.list-container {
display: flex;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
list-style: none;
margin: 0;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/modal.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.modal {
display: flex;
flex-direction: column;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
max-height: 70vh;
overflow: hidden;
transform-origin: 50% 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/navbar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: var(--navbar-text-color);
display: flex;
flex-direction: row;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
height: 60px;
justify-content: space-between;
padding: 0 $space-ml;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pagination/pagination.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

align-items: center;
display: flex;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
padding: $space-xxs 0;

span,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Panel/panel.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.panel {
display: flex;
flex-direction: column;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
position: absolute;
padding: 0 $space-xl;
background: var(--background-color);
Expand Down
2 changes: 1 addition & 1 deletion src/components/PersistentBar/persistentBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

.content {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-style: normal;
font-weight: $text-font-weight-light;
font-size: $text-font-size-2;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/select.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $multi-select-count-offset: 54px;
}

.select-wrapper {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
position: relative;
width: 100%;

Expand Down
8 changes: 4 additions & 4 deletions src/components/Slider/slider.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $small-min-label-offset-with-steps: 0;

// Default size is medium
.slider-container {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
height: $medium-slider-height + $medium-label-height;
position: relative;

Expand Down Expand Up @@ -112,7 +112,7 @@ $small-min-label-offset-with-steps: 0;
color: var(--slider-value-text-color);
cursor: pointer;
display: inline-block;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-2;
padding: 0 $space-xxxs;
position: absolute;
Expand Down Expand Up @@ -276,7 +276,7 @@ $small-min-label-offset-with-steps: 0;
.slider-value {
bottom: 0;
color: var(--slider-value-text-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-2;
padding: 0 $space-xxxs;
position: absolute;
Expand All @@ -285,7 +285,7 @@ $small-min-label-offset-with-steps: 0;

.extremity-label {
color: var(--slider-extremity-text-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-2;
position: absolute;
bottom: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Snackbar/snackbar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
align-items: center;
box-shadow: $shadow-object-l;
border: none;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
min-width: 21vw;
max-width: min(42vw, 640px);
animation: slideUpIn $motion-duration-extra-fast $motion-easing-easeinout 0s
Expand All @@ -20,7 +20,7 @@
}

.snackbar-container {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
position: fixed;
width: fit-content;
z-index: $z-index-600;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/Styles/table.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.table {
@include reset-component();
position: relative;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $table-font-size;
background: var(--table-background-color);

Expand Down
6 changes: 3 additions & 3 deletions src/components/Tabs/tabs.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
background: var(--tab-background);
cursor: pointer;
display: flex;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
justify-content: center;
padding: $space-s $space-m;
position: relative;
Expand Down Expand Up @@ -63,7 +63,7 @@
}

.label {
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-3;
font-weight: $text-font-weight-semibold;
white-space: nowrap;
Expand Down Expand Up @@ -277,7 +277,7 @@
border: var(--border-width) solid var(--border);
border-radius: var(--border-radius);
color: var(--label);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-weight: $text-font-weight-semibold;
height: var(--height);
margin: 0 $space-s;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip/tooltip.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $tooltip-arrow-shadow: 0px 1px 2px rgba(15, 20, 31, 0.12);
background: var(--bg);
border-radius: var(--tooltip-border-radius);
color: var(--text-color);
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
font-size: $text-font-size-1;
overflow-wrap: break-word;
padding: $space-xs;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tree/Styles/tree.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $tree-node-hightlight-color: inherit;
@include reset-component();
background: var(--background-color);
border-radius: $tree-border-radius-base;
font-family: $octuple-font-family;
font-family: var(--font-stack-full);
transition: background-color 0.3s;

&-focused:not(:hover):not(&-active-focused) {
Expand Down
2 changes: 0 additions & 2 deletions src/styles/themes/_definitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ $tree-node-selected-bg: var(--primary-color);

// BEGIN: NON-COLOR DEFINITIONS

$octuple-font-family: var(--font-stack-full);

$text-font-size-1: 12px;
$text-font-size-2: 14px;
$text-font-size-3: 16px;
Expand Down

0 comments on commit 5f014ec

Please sign in to comment.