Skip to content

Commit eb746b6

Browse files
committed
minor #1121 [Site] Use monospace system font (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Use monospace system font TL;DR; i suggest to use native system fonts instead of webfont. Follow #1119, this time for the `monospace` font, with the same reasons. Again, I put online some before/after captures* with a slider tool to compare. (* made on macOS Ventura / Firefox) Captures here: https://smnand.re/w/b68eda/ <img width="1565" alt="slider-comparaison" src="https://github.com/symfony/ux/assets/1359581/c1fd99cd-bc38-4279-9e5f-46f175903d0b"> I made two separate PR because developpers tend to be a little more sensible about code fonts :) Commits ------- e9ffa85 Use monospace system font
2 parents 4a5d9df + e9ffa85 commit eb746b6

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

ux.symfony.com/assets/styles/_variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ $green: #84DE2C;
1616
$primary: #222 !default;
1717

1818
$size-unit: calc(8px + 1.5625vw);
19+
20+
$font-family-monospace: var(--font-family-code);

ux.symfony.com/assets/styles/app/_root.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
--space-larger: 2rem;
1515

1616
// Fonts
17+
// --font-family-title: "Ubuntu";
1718
--font-family-text: system-ui, sans-serif;
19+
--font-family-code: ui-monospace, "SF Mono", SFMono-Regular, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
1820

1921
// Colors
2022
--color-primary: var(--bs-body-color);

ux.symfony.com/assets/styles/components/_Terminal.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
.Terminal_body {
7777
background-color: $n-800;
7878
height: 100%;
79-
font-family: 'Space Mono', monospace;
79+
font-family: var(--font-family-code);
8080
font-size: 14px;
8181
line-height: 160%;
8282
color: #FFF;

ux.symfony.com/assets/styles/components/_TerminalCommand.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
background: transparent;
3535
z-index: 4;
3636
outline: none;
37-
font-family: var(--bs-font-monospace);
37+
font-family: var(--font-family-code);
3838
font-size: .9rem;
3939
padding: 0 .5rem;
4040
width: inherit;

ux.symfony.com/templates/base.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<meta name="color-scheme" content="light dark">
1313
<link rel="preconnect" href="https://fonts.googleapis.com" />
1414
{% block stylesheets %}
15-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700i|Space+Mono|Ubuntu:400,700&display=swap">
15+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700i|Ubuntu:400,700&display=swap">
1616
{{ ux_controller_link_tags() }}
1717
<link rel="stylesheet" href="{{ asset('styles/app.scss') }}">
1818
{% endblock %}

0 commit comments

Comments
 (0)