Skip to content

Instantly share code, notes, and snippets.

@thecodermehedi
Created November 23, 2024 07:36
Show Gist options
  • Save thecodermehedi/41ca0fb32c59b4430166cb0f176638c1 to your computer and use it in GitHub Desktop.
Save thecodermehedi/41ca0fb32c59b4430166cb0f176638c1 to your computer and use it in GitHub Desktop.
Compact typography for the web
@import url('https://fonts.googleapis.com/css?family=Lato:400,700|Lora|Playfair+Display:700i,900');
html,
body {
margin: 0;
width: 100%;
}
h1,
h2,
p,
i,
a,
.first-letter,
.authorName a {
color: rgba(0, 0, 0, 0.84);
text-rendering: optimizeLegibility;
}
h1 {
font-family: "Playfair Display", serif;
font-size: 48px;
text-align: left;
margin-bottom: 8px;
}
h2 {
font-family: "Lato", sans-serif;
font-size: 26px;
font-weight: 700;
padding: 0;
margin: 56px 0 -13px -1.883px;
text-align: left;
line-height: 34.5px;
letter-spacing: -0.45px;
}
p, i, a {
margin-top: 21px;
font-family: "Lora";
font-size: 21px;
letter-spacing: -0.03px;
line-height: 1.58;
}
a {
text-decoration: underline;
}
blockquote {
font-family: "Playfair Display", serif;
font-size: 30px;
font-style: italic;
letter-spacing: -0.36px;
line-height: 44.4px;
overflow-wrap: break-word;
margin: 55px 0 33px 0;
/* text-align: center; */
color: rgba(0, 0, 0, 0.68);
padding: 0 0 0 50px;
}
code {
font-size: 18px;
background: rgba(0,0,0,.05);
border-radius: 2px;
padding: 3px 5px;
}
mark, .highlighted {
background: #7DFFB3;
}
.first-letter {
overflow-wrap: break-word;
font-family: "Playfair Display", serif;
font-size: 60px;
line-height: 60px;
display: block;
position: relative;
float: left;
margin: 0px 7px 0 -5px;
}
.subtitle {
font-family: "Lato", sans-serif;
color: rgba(0, 0, 0, 0.54);
margin: 0 0 24px 0;
}
::selection{background-color: lavender}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment