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

[TECH] Mettre à jour les tailles de différentes typographies (PIX-15000). #765

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
34 changes: 24 additions & 10 deletions addon/styles/pix-design-tokens/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
--font-size-title: 2rem;

font-size: var(--font-size-title);
line-height: 1.3;
line-height: 2.625rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question il me semblait qu'on avait eu des souci avec le line-height en rem plutôt quand % 🤔 . mais je ne m'en rappel plus bien

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ouais ? Étonnant !
Je vais me renseigner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok pour le design, a voir côté tech pour cette histoire de rem 😉

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On en est où ?

letter-spacing: calc(-0.02 * var(--font-size-title));

@include device-is('tablet') {
--font-size-title: 2.5rem;
--font-size-title: 2.25rem;

line-height: 2.875rem;
}

@include device-is('desktop') {
--font-size-title: 3rem;
--font-size-title: 2.5rem;

line-height: 3.25rem;
}
}

Expand All @@ -35,16 +39,20 @@
--letter-spacing-title: -0.02;

font-size: var(--font-size-title);
line-height: 1.3;
line-height: 2.125rem;
letter-spacing: calc(var(--letter-spacing-title) * var(--font-size-title));

@include device-is('tablet') {
--font-size-title: 2rem;

line-height: 2.625rem;
}

@include device-is('desktop') {
--font-size-title: 2.25rem;
--letter-spacing-title: -0.01;

line-height: 2.875rem;
}
}

Expand All @@ -55,15 +63,19 @@
--font-size-title: 1.375rem;

font-size: var(--font-size-title);
line-height: 1.3;
line-height: 1.75rem;
letter-spacing: calc(-0.01 * var(--font-size-title));

@include device-is('tablet') {
--font-size-title: 1.5rem;

line-height: 2rem;
}

@include device-is('desktop') {
--font-size-title: 1.75rem;

line-height: 2.25rem;
}
}

Expand All @@ -74,7 +86,7 @@
--font-size-title: 1.25rem;

font-size: var(--font-size-title);
line-height: 1.4;
line-height: 1.75rem;
letter-spacing: calc(-0.01 * var(--font-size-title));
}

Expand Down Expand Up @@ -106,7 +118,7 @@
@extend %-pix-body;

font-size: 0.75rem;
line-height: 1.5;
line-height: 1.125rem;
letter-spacing: 0.02em;
}

Expand All @@ -115,18 +127,19 @@
@extend %-pix-body;

font-size: 0.875rem;
line-height: 1.5;
line-height: 1.25rem;
}

%pix-body-m,
.pix-body-m {
@extend %-pix-body;

font-size: 0.875rem;
line-height: 1.5;
line-height: 1.25rem;

@include device-is('tablet') {
font-size: 1rem;
line-height: 1.5rem;
}
}

Expand All @@ -135,10 +148,11 @@
@extend %-pix-body;

font-size: 1rem;
line-height: 1.5;
line-height: 1.5rem;

@include device-is('tablet') {
font-size: 1.125rem;
line-height: 1.625rem;
}
}

Expand Down
Loading