Skip to content

Commit

Permalink
console: Fix font and weight values
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrephz authored and ryaplots committed Jul 30, 2024
1 parent 29d26c7 commit 5aed9c2
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 43 deletions.
2 changes: 1 addition & 1 deletion pkg/webui/components/news-panel/news-item/news-item.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

.title
width: 100%
font-weight: $fwv2.bold
font-weight: $fw.bolder
color: var(--c-text-neutral-heavy)
overflow: hidden
display: -webkit-box
Expand Down
6 changes: 3 additions & 3 deletions pkg/webui/components/panel/panel.styl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
flex-shrink: 0

&-title
font-weight: $fwv2.bold
font-size: $fsv2.l
font-weight: $fw.bolder
font-size: $fs.l
line-height: 1.3
white-space: nowrap
text-overflow: ellipsis
overflow: hidden

&-button
font-weight: $fwv2.semibold
font-weight: $fw.bold
text-decoration: none transparent
transition: text-decoration $ad.s ease-in-out
align-self: center
Expand Down
2 changes: 1 addition & 1 deletion pkg/webui/components/panel/toggle/toggle.styl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
&-active
box-shadow: var(--shadow-box-button-normal)
background: var(--c-bg-neutral-min)
font-weight: $fwv2.regular
font-weight: $fw.normal
border: 1px solid var(--c-border-neutral-light)

&:hover:not(.toggle-button-active)
Expand Down
3 changes: 1 addition & 2 deletions pkg/webui/components/search-panel/search-panel.styl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

.result-header
text-transform: uppercase
font-size: $fsv2.s
font-size: $fs.s
color: var(--c-text-neutral-light)
font-weight: $fw.bold
padding: $cs.m $cs.xl $cs.xs $cs.xl
Expand Down Expand Up @@ -123,4 +123,3 @@
line-height: 1
width: fit-content
margin: 0 auto

4 changes: 2 additions & 2 deletions pkg/webui/components/sidebar/side-footer/side-footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
&-content
display: flex
width: 100%
font-weight: $fwv2.bold
font-weight: $fw.bolder
white-space: nowrap

.support-button
Expand Down Expand Up @@ -53,7 +53,7 @@
.side-footer-version
margin-left: $cs.xxs
color: var(--c-text-neutral-semilight)
font-weight: $fwv2.regular
font-weight: $fw.normal
overflow: hidden
text-overflow: ellipsis

Expand Down
2 changes: 1 addition & 1 deletion pkg/webui/components/table/cell/cell.styl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
white-space: nowrap

&-panel-style
font-size: $fsv2.s
font-size: $fs.s

&-data
height: 4rem
Expand Down
2 changes: 1 addition & 1 deletion pkg/webui/components/tabs/tab/tab.styl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
&-active
box-shadow: var(--shadow-box-button-normal)
background: var(--c-bg-neutral-min)
font-weight: $fwv2.regular
font-weight: $fw.normal
border: 1px solid var(--c-border-neutral-light)
color: var(--c-text-neutral-heavy)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
white-space: nowrap
color: var(--c-text-neutral-heavy)
font-weight: $fw.bold
font-size: $fsv2.l
font-size: $fs.l
margin: 0

.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
white-space: nowrap
color: var(--c-text-neutral-heavy)
font-weight: $fw.bold
font-size: $fsv2.l
font-size: $fs.l
margin: 0

.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
text-overflow: ellipsis
color: var(--c-text-neutral-heavy)
font-weight: $fw.bold
font-size: $fsv2.l
font-size: $fs.l
margin: 0

.id
Expand All @@ -49,4 +49,3 @@

.created-at-status > span
display: none

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.gtw-status-panel-upgrade-button
background: var(--c-bg-brand-extralight)
color: var(--c-text-brand-normal)
font-weight: $fwv2.medium
font-weight: $fw.medium
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05)
margin-top: $cs.m
width: fit-content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
top: $cs.s

.source
font-size: $fsv2.s
font-size: $fs.s
font-weight: $fw.bold

.received
color: var(--c-text-neutral-light)
font-size: $fsv2.s
font-size: $fs.s
font-weight: $fw.bold
text-transform: uppercase

.received-status > span
display: none

.header-title
font-weight: $fwv2.bold
font-size: $fsv2.l
font-weight: $fw.bolder
font-size: $fs.l
white-space: nowrap
text-overflow: ellipsis
overflow: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

&-preview
margin-top: $cs.xxs
font-weight: $fwv2.regular
font-weight: $fw.normal
color: var(--c-text-neutral-light)

&-total
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/console/containers/notifications/notifications.styl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
padding: $cs.xs

&-date
font-weight: $fwv2.regular
font-weight: $fw.normal
color: var(--c-text-neutral-light)

+media-query($bp.sm)
Expand Down Expand Up @@ -79,7 +79,7 @@
max-width: fit-content

&-title
font-weight: $fwv2.semibold
font-weight: $fw.bold
align-items: center

+media-query($bp.lg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
background: var(--c-bg-brand-normal)
color: var(--c-text-neutral-min)
font-size: $fs.m
font-weight: $fwv2.semibold
font-weight: $fw.bold
transition: $ad.s background ease-in-out

&-title-wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
white-space: nowrap
color: var(--c-text-neutral-heavy)
font-weight: $fw.bold
font-size: $fsv2.l
font-size: $fs.l
margin: 0

.id
Expand Down
2 changes: 1 addition & 1 deletion pkg/webui/containers/fetch-table/fetch-table.styl
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
color: var(--c-text-error-normal)

.add-button
font-weight: $fwv2.medium
font-weight: $fw.medium
22 changes: 5 additions & 17 deletions pkg/webui/styles/variables/generic.styl
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,16 @@ $line-height-margin-factor = .3rem // Used for margin calculations on text eleme
// ## Font Scale

$fs = {
's': .857rem, // ~12px
's': .75rem, // 10.5px
'm': 1rem, // 14px
'l': 1.286rem, // ~18p
'l': 1.25rem, // 17.5px
'xl': 1.57rem, // ~22px
'xxl': 1.857rem, // ~26px
'xl3': 2.285rem, // ~32px
'xl4': 3rem, // 48px
'xl5': 3.428rem,
}

$fsv2 = {
's': .75rem,
'm': 1rem,
'l': 1.25rem,
}

// Corresponding default line heights.
$lh = {
's': $line-height-base,
Expand All @@ -89,16 +83,10 @@ $lh = {

// Font weights for body copy
$fw = {
'normal': 500,
'bold': 600, // Prefer this over `bolder`.
'bolder': 800,
}

$fwv2 = {
'regular': 400,
'normal': 400,
'medium': 500,
'semibold': 600,
'bold': 700,
'bold': 600, // Prefer this over `bolder`.
'bolder': 700,
}

// Font weights for headings
Expand Down

0 comments on commit 5aed9c2

Please sign in to comment.