Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 Update typography styles #15

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/core/lume-axis/styles.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use '~@/styles/variables' as *;
@use '~@/styles/mixins/base' as *;
@use '~@/styles/mixins/typography' as *;

$axis-label-font-size: 10px;
$axis-label-color: $lume-color-grey-50;
$axis-label-hover-color: $lume-color-grey-70;

Expand All @@ -21,8 +21,9 @@ $axis-line-color: $lume-color-grey-20;
}

&__label {
@include typography-axis;

fill: $axis-label-color;
font-size: $axis-label-font-size;
cursor: default;
transition: all $lume-transition-time-short ease-in-out;
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/core/lume-chart-legend/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '~@/styles/variables' as *;
@use '~@/styles/mixins/base' as *;
@use '~@/styles/mixins/typography' as *;

.lume-chart-legend {
@include base;
Expand All @@ -8,13 +9,15 @@
justify-items: end;

&__item {
@include typography-body;

display: flex;
align-items: center;

padding: 0.25rem 0.5rem;
gap: 0.25rem;

font-size: $lume-text-font-size-small;
color: $lume-color-grey-60;

cursor: default;
}
Expand Down
12 changes: 7 additions & 5 deletions src/components/core/lume-tooltip/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

@use '~@/styles/variables' as *;
@use '~@/styles/mixins/base' as *;
@use '~@/styles/mixins/typography' as *;

// Tooltip box -----------------------------------------------------------------
$lume-tooltip-color: $lume-color-grey-90 !default;
$lume-tooltip-color: $lume-color-grey-100 !default;
$lume-tooltip-background-color: $lume-color-white !default;
$lume-tooltip-border-radius: $lume-border-radius-8 !default;
$lume-tooltip-box-shadow: $lume-box-shadow !default;
Expand All @@ -13,18 +14,18 @@ $lume-tooltip-max-width: 288px !default;
$lume-tooltip-content-padding: $lume-spacing-10 !default;
$lume-tooltip-z-index: 500 !default;

$lume-tooltip-item-line-height: $lume-spacing-16 !default;
$lume-tooltip-item-line-height: $lume-line-height-sm !default;
$lume-tooltip-item-min-width: 112px !default;
$lume-tooltip-symbol-size: $lume-spacing-10 !default;

.lume-tooltip {
@include base;
@include typography-caption;

position: absolute;
max-width: $lume-tooltip-max-width;
padding: $lume-tooltip-content-padding;

font-size: $lume-text-font-size-small;
color: $lume-tooltip-color;

background: $lume-tooltip-background-color;
Expand All @@ -40,7 +41,7 @@ $lume-tooltip-symbol-size: $lume-spacing-10 !default;

&__title {
margin-bottom: $lume-spacing-8;
font-weight: $lume-text-font-weight-bold;
font-weight: $lume-font-weight-medium;
}

&__items {
Expand Down Expand Up @@ -71,8 +72,9 @@ $lume-tooltip-symbol-size: $lume-spacing-10 !default;
}

&__value {
flex-shrink: 0;
font-weight: $lume-font-weight-medium;
margin-left: auto;
padding-left: $lume-spacing-8;
flex-shrink: 0;
}
}
8 changes: 5 additions & 3 deletions src/components/groups/lume-alluvial-group/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '~@/styles/variables' as *;
@use '~@/styles/mixins/base' as *;
@use '~@/styles/mixins/typography' as *;

.lume-alluvial-group {
@include base;
Expand Down Expand Up @@ -44,11 +45,12 @@
}

&__node-title {
font-size: $lume-text-font-size-small;
@include typography-caption;
}

&__node-value {
font-size: $lume-text-font-size-small;
font-weight: $lume-text-font-weight-semi-bold;
@include typography-caption;

font-weight: $lume-font-weight-medium;
}
}
13 changes: 5 additions & 8 deletions src/styles/_titles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use 'variables' as *;
@use 'mixins/base' as *;
@use 'mixins/typography' as *;

@mixin title-base {
@include base;
Expand All @@ -9,19 +10,15 @@

.lume-chart-title {
@include title-base;
@include typography-heading;

color: $lume-color-grey-100;
margin-bottom: 1rem;

font-size: $lume-text-font-size-big;
font-weight: $lume-text-font-weight-medium;
line-height: 2rem;
}

.lume-axis-title {
@include title-base;
@include typography-body;

font-size: $lume-text-font-size-medium;
font-weight: $lume-text-font-weight-normal;
line-height: 1rem;
color: $lume-color-grey-50;
color: $lume-color-grey-60;
}
2 changes: 1 addition & 1 deletion src/styles/mixins/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '../variables' as *;
@use '../variables/typography' as *;

@mixin base {
font-family: $lume-font-family, system-ui, -apple-system, BlinkMacSystemFont,
Expand Down
25 changes: 25 additions & 0 deletions src/styles/mixins/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@use '../variables/typography' as *;

@mixin typography-heading {
font-size: $lume-font-size-lg;
font-weight: $lume-font-weight-medium;
line-height: $lume-line-height-lg;
}

@mixin typography-body {
font-size: $lume-font-size-md;
font-weight: $lume-font-weight-regular;
line-height: $lume-line-height-md;
}

@mixin typography-caption {
font-size: $lume-font-size-sm;
font-weight: $lume-font-weight-regular;
line-height: $lume-line-height-sm;
}

@mixin typography-axis {
font-size: $lume-font-size-xs;
font-weight: $lume-font-weight-medium;
line-height: $lume-line-height-xs;
}
24 changes: 15 additions & 9 deletions src/styles/variables/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@

$lume-font-family: 'Inter', sans-serif !default;

// Weight
// Size

$lume-text-font-weight-normal: 400 !default;
$lume-text-font-weight-medium: 500 !default;
$lume-text-font-weight-semi-bold: 600 !default;
$lume-text-font-weight-bold: 700 !default;
$lume-font-size-xs: 10px !default;
$lume-font-size-sm: 12px !default;
$lume-font-size-md: 14px !default;
$lume-font-size-lg: 20px !default;

// Size
// Line height

$lume-line-height-xs: 14px !default;
$lume-line-height-sm: 16px !default;
$lume-line-height-md: 22px !default;
$lume-line-height-lg: 28px !default;

// Weight

$lume-text-font-size-small: 13px !default;
$lume-text-font-size-medium: 14px !default;
$lume-text-font-size-big: 24px !default;
$lume-font-weight-regular: 400 !default;
$lume-font-weight-medium: 500 !default;
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@ exports[`lume-alluvial-diagram.vue mounts component and sets prop values 1`] = `
<div
class="lume-chart__header"
>
<!---->

<div
class="lume-chart__controls"
/>

<!---->
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart__controls"
/>
</div>

<!---->
<div
class="lume-chart__header-section"
>
<!---->

<!---->
</div>
</div>

<svg
Expand Down Expand Up @@ -78,15 +86,23 @@ exports[`lume-alluvial-diagram.vue mounts component and sets prop values using r
<div
class="lume-chart__header"
>
<!---->

<div
class="lume-chart__controls"
/>

<!---->
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart__controls"
/>
</div>

<!---->
<div
class="lume-chart__header-section"
>
<!---->

<!---->
</div>
</div>

<svg
Expand Down Expand Up @@ -146,15 +162,23 @@ exports[`lume-alluvial-diagram.vue should be able to handle an dataset with a si
<div
class="lume-chart__header"
>
<!---->

<div
class="lume-chart__controls"
/>

<!---->
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart__controls"
/>
</div>

<!---->
<div
class="lume-chart__header-section"
>
<!---->

<!---->
</div>
</div>

<svg
Expand Down Expand Up @@ -214,15 +238,23 @@ exports[`lume-alluvial-diagram.vue should be able to handle an dataset with only
<div
class="lume-chart__header"
>
<!---->

<div
class="lume-chart__controls"
/>

<!---->
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart__controls"
/>
</div>

<!---->
<div
class="lume-chart__header-section"
>
<!---->

<!---->
</div>
</div>

<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,37 @@ exports[` 1`] = `
<div
class="lume-chart__header"
>
<!---->

<div
class="lume-chart__controls"
/>

<!---->
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart__controls"
/>
</div>

<div
class="lume-chart-legend lume-chart__legend"
data-j-chart-legend=""
class="lume-chart__header-section"
>
<!---->

<div
class="lume-chart-legend__item"
tabindex="0"
class="lume-chart-legend lume-chart__legend"
data-j-chart-legend=""
>
<span
class="lume-chart-legend__circle lume-background-color--skyblue"
data-j-chart-legend__circle=""
/>

<div
class="lume-chart-legend__item"
tabindex="0"
>
<span
class="lume-chart-legend__circle lume-background-color--skyblue"
data-j-chart-legend__circle=""
/>



</div>
</div>
</div>
</div>
Expand Down
Loading