[Glitch] Add webfonts for 5.0 redesign
Port 01a6b3aece to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
47253f3f09
commit
d7a3b29a9a
9 files changed
+52
-24
No files matched your search
@@ -54,7 +54,13 @@ export const ThemePlayground: React.FC = () => {
|
||||
</button>
|
||||
</aside>
|
||||
</nav>
|
||||
<main>Test 1 2 3</main>
|
||||
<main>
|
||||
<h1>Home</h1>
|
||||
<p>Test 1 2 3</p>
|
||||
<p>
|
||||
This is a <strong>bold statement!</strong>
|
||||
</p>
|
||||
</main>
|
||||
<div className={classes.overlay}>Hello World</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
+17
@@ -1,17 +1,34 @@
|
||||
@use '@/styles/mastodon/mixins';
|
||||
|
||||
.wrapper {
|
||||
// Override global body font variable because Storybook
|
||||
// doesn't have the `data-redesign` html attribute
|
||||
--font-body: Inter, sans-serif;
|
||||
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 250px 1fr;
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-3xl);
|
||||
font-family: Inter, sans-serif;
|
||||
font-size: var(--fs-lg);
|
||||
line-height: var(--lh-normal);
|
||||
overflow-wrap: break-word;
|
||||
color: var(--color-text-primary);
|
||||
background-color: var(--color-bg-blend);
|
||||
|
||||
h1 {
|
||||
@include mixins.type-heading-lg;
|
||||
}
|
||||
|
||||
p {
|
||||
@include mixins.type-body;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
* {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
@use 'mastodon/mixins';
|
||||
@use '@/styles/fonts/roboto';
|
||||
@use '@/styles/fonts/roboto-mono';
|
||||
@use '@/styles/fonts/inter';
|
||||
@use '@/styles/fonts/syne';
|
||||
|
||||
@use 'mastodon/reset';
|
||||
@use 'mastodon/tokens';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
@mixin type-heading-lg {
|
||||
// font-family: Syne;
|
||||
font-family: var(--font-heading);
|
||||
font-size: var(--fs-3xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
@mixin type-heading-md {
|
||||
// font-family: Syne;
|
||||
font-family: var(--font-heading);
|
||||
font-size: var(--fs-2xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tighter);
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
@mixin type-heading-sm {
|
||||
// font-family: Syne;
|
||||
font-family: var(--font-heading);
|
||||
font-size: var(--fs-xl);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
@mixin type-body-lg {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
@mixin type-body-strong {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-md);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-normal);
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
@mixin type-body {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-md);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-normal);
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
@mixin type-body-compact {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tight);
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
|
||||
@mixin type-label-lg {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: bold;
|
||||
line-height: var(--lh-tight);
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
@mixin type-label-md {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
@mixin type-label-sm {
|
||||
// font-family: Inter;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--fs-2xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
@@ -83,7 +83,7 @@
|
||||
}
|
||||
|
||||
@mixin type-micro {
|
||||
// font-family: 'JetBrains Mono';
|
||||
font-family: var(--font-monospace);
|
||||
font-size: var(--fs-3xs);
|
||||
font-weight: normal;
|
||||
line-height: var(--lh-tighter);
|
||||
|
||||
@@ -13,6 +13,3 @@ $no-gap-breakpoint: 1175px;
|
||||
$mobile-menu-breakpoint: 760px;
|
||||
$mobile-breakpoint: 630px;
|
||||
$no-columns-breakpoint: 600px;
|
||||
|
||||
$font-sans-serif: 'mastodon-font-sans-serif' !default;
|
||||
$font-monospace: 'mastodon-font-monospace' !default;
|
||||
@@ -8,6 +8,14 @@ html {
|
||||
scrollbar-color: var(--color-text-secondary) var(--color-bg-secondary);
|
||||
}
|
||||
|
||||
--font-body: mastodon-font-sans-serif, sans-serif;
|
||||
--font-heading: Syne, sans-serif;
|
||||
--font-monospace: mastodon-font-monospace, monospace;
|
||||
|
||||
&[data-redesign='true'] {
|
||||
--font-body: Inter, sans-serif;
|
||||
}
|
||||
|
||||
--outline-focus-default: 2px solid var(--color-border-brand);
|
||||
--avatar-border-radius: 8px;
|
||||
--max-media-height-small: 460px;
|
||||
@@ -45,7 +53,7 @@ html.has-modal {
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: $font-sans-serif, sans-serif;
|
||||
font-family: var(--font-body);
|
||||
background: var(--color-bg-primary);
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
@@ -73,7 +81,6 @@ body {
|
||||
// Fira Sans => Firefox OS
|
||||
// Droid Sans => Older Androids (<4.0)
|
||||
// Helvetica Neue => Older macOS <10.11
|
||||
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
|
||||
font-family:
|
||||
system-ui,
|
||||
-apple-system,
|
||||
@@ -85,7 +92,6 @@ body {
|
||||
'Fira Sans',
|
||||
'Droid Sans',
|
||||
'Helvetica Neue',
|
||||
$font-sans-serif,
|
||||
sans-serif;
|
||||
}
|
||||
|
||||
|
||||
@@ -1037,7 +1037,7 @@ body > [data-popover-placement] {
|
||||
|
||||
.character-counter {
|
||||
cursor: default;
|
||||
font-family: $font-sans-serif, sans-serif;
|
||||
font-family: var(--font-body);
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@use 'variables' as *;
|
||||
|
||||
code {
|
||||
font-family: $font-monospace, monospace;
|
||||
font-family: var(--font-monospace);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ code {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
font-family: $font-monospace, monospace;
|
||||
font-family: var(--font-monospace);
|
||||
background: var(--color-bg-secondary);
|
||||
color: var(--color-text-primary);
|
||||
font-size: 14px;
|
||||
@@ -1147,7 +1147,7 @@ code {
|
||||
.form_admin_settings_custom_css,
|
||||
.form_admin_settings_closed_registrations_message {
|
||||
textarea {
|
||||
font-family: $font-monospace, monospace;
|
||||
font-family: var(--font-monospace);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1172,7 +1172,7 @@ code {
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
font-family: $font-monospace, monospace;
|
||||
font-family: var(--font-monospace);
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
}
|
||||
|
||||
samp {
|
||||
font-family: $font-monospace, monospace;
|
||||
font-family: var(--font-monospace);
|
||||
}
|
||||
|
||||
button.table-action-link {
|
||||
|
||||
Reference in new issue
Block a user