Skip to content

Instantly share code, notes, and snippets.

@mattbogado
Last active September 18, 2020 04:08
Show Gist options
  • Save mattbogado/43b9b45873cbf4a9874c to your computer and use it in GitHub Desktop.
Save mattbogado/43b9b45873cbf4a9874c to your computer and use it in GitHub Desktop.
Material Design Font Sizes
/* Font Family */
<link href="http://fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" rel="stylesheet" type="text/css">
body {
font-family: 'RobotoDraft', sans-serif;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
}
/* Typography */
.text-display-4 {
font-size: 112px;
font-weight: 300;
line-height: 128px;
letter-spacing: -5px;
padding-top: 17px;
margin-bottom: 15px;
}
.text-display-3 {
font-size: 56px;
font-weight: 400;
line-height: 64px;
padding-top: 8px;
margin-bottom: 28px;
}
.text-display-2 {
font-size: 45px;
font-weight: 400;
line-height: 48px;
margin-bottom: 11px;
}
.text-display-1 {
font-size: 34px;
font-weight: 400;
line-height: 40px;
padding-top: 8px;
margin-bottom: 12px;
}
.text-headline {
font-size: 24px;
font-weight: 400;
line-height: 32px;
padding-top: 16px;
margin-bottom: 12px;
}
.text-title {
font-size: 20px;
font-weight: 600;
line-height: 44px;
padding-top: 18px;
margin-bottom: 12px;
}
.text-subhead {
font-size: 16px;
font-weight: 400;
line-height: 28px;
padding-top: 2px;
margin-bottom: 10px;
}
.text-body-2 {
font-size: 14px;
font-weight: 600;
line-height: 24px;
padding-top: 4px;
margin-bottom: 12px;
}
.text-body-1 {
font-size: 14px;
font-weight: 400;
line-height: 20px;
padding-top: 6px;
margin-bottom: 14px;
}
.text-caption {
font-size: 12px;
font-weight: 400;
line-height: 20px;
padding-top: 6px;
margin-bottom: 14px;
}
.text-menu {
font-size: 14px;
font-weight: 600;
line-height: 32px;
padding-top: 6px;
margin-bottom: 14px;
}
.text-button {
font-size: 14px;
text-transform: uppercase;
font-weight: 600;
line-height: 20px;
padding-top: 5px;
margin-bottom: 15px;
}
/* General HTML Typography */
body {
font-size: 14px;
line-height: 20px;
}
h1 {.text-display-2;}
h2 {.text-display-1;}
h3 {.text-headline;}
h4 {.text-title;}
h5 {.text-subhead;}
h6 {.text-body-2;}
p {.text-body-1;}
/* Color */
.text-display-4,
.text-display-3,
.text-display-2,
.text-display-1,
.text-caption {
color:rgba(0,0,0,.54);
}
.text-headline,
.text-title,
.text-subhead,
.text-body,
.text-menu,
.text-button {
color:rgba(0,0,0,.87);
}
@renatojobal
Copy link

Very useful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment