Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 976affd

Browse files
feat(theme): Add typography styles to shrine demo (#2605)
1 parent c529cea commit 976affd

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

demos/theme/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<meta name="viewport" content="width=device-width, initial-scale=1">
2222
<link rel="icon" type="image/png" href="/images/logo_components_color_2x_web_48dp.png">
2323
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono">
24+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300,400,500">
2425
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
2526
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
2627
<script src="/ready.js"></script>

demos/theme/theme-shrine.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,26 @@ $mdc-theme-secondary: #feeae6;
2121
$mdc-theme-on-primary: #442b2d;
2222
$mdc-theme-on-secondary: #442b2d;
2323

24+
$mdc-typography-font-family: Rubik, sans-serif;
25+
26+
$mdc-typography-styles-headline5: (
27+
font-weight: 500
28+
);
29+
30+
$mdc-typography-styles-subtitle1: (
31+
font-weight: 400,
32+
);
33+
34+
// letter-spacing from Sketch is in pixels and is relative to the font size in pixels.
35+
// This is calculated using $letter-spacing / ($font-size * $root-em)
36+
$mdc-typography-styles-button: (
37+
letter-spacing: calc(1 / (.875 * 16) * 1em),
38+
);
39+
40+
$mdc-typography-styles-overline: (
41+
font-size: .875rem, // 14sp
42+
font-weight: 400,
43+
letter-spacing: calc(2.1 / (.875 * 16) * 1em),
44+
);
45+
2446
@import "./theme-shared";

0 commit comments

Comments
 (0)