Skip to content

Commit c76be3e

Browse files
authored
Merge pull request #253 from bettistein/font-tweaks
font tweaks / cleanups
2 parents fbf0c4f + 1b5e2fd commit c76be3e

13 files changed

+46
-50
lines changed

src/Blog.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Blog.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ let default = (props: props): React.element => {
264264
let errorBox = if ProcessEnv.env === ProcessEnv.development && Belt.Array.length(malformed) > 0 {
265265
<div className="mb-12">
266266
<Markdown.Warn>
267-
<h2 className="font-bold text-gray-95 text-2xl mb-2">
267+
<h2 className="font-bold text-gray-95 text-32 mb-2">
268268
{React.string("Some Blog Posts are Malformed!")}
269269
</h2>
270270
<p>

src/BlogArticle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BlogArticle.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ let default = (props: props) => {
216216
<div className="mt-12">
217217
<Line />
218218
<div className="pt-20 flex flex-col items-center">
219-
<div className="text-3xl sm:text-4xl text-center text-gray-95 font-medium">
219+
<div className="text-3xl sm:text-32 text-center text-gray-95 font-medium">
220220
{React.string("Want to read more?")}
221221
</div>
222222
<Next.Link href="/blog">

src/components/CodeExample.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/CodeExample.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ let make = (~highlightedLines=[], ~code: string, ~showLabel=true, ~lang="text")
2323
}
2424

2525
<div //normal code-text without tabs
26-
className="relative w-full flex-col rounded-none xs:rounded border-t border-b xs:border border-gray-10 bg-gray-5 py-2 text-gray-90">
27-
label <div className="px-4 text-14 pt-4 pb-2 overflow-x-auto -mt-2"> children </div>
26+
className="relative w-full flex-col rounded-none xs:rounded-lg border-t border-b xs:border border-gray-10 bg-gray-5 py-2 text-gray-80">
27+
label <div className="px-5 text-14 pt-4 pb-2 overflow-x-auto -mt-2"> children </div>
2828
</div>
2929
}
3030

@@ -110,11 +110,11 @@ module Toggle = {
110110
<div
111111
className="absolute flex w-full overflow-auto scrolling-touch font-sans bg-transparent text-14 text-gray-40 "
112112
style={ReactDOM.Style.make(~marginTop="-30px", ())}>
113-
<div className="flex space-x-2"> {React.array(tabElements)} </div>
113+
<div className="flex space-x-1"> {React.array(tabElements)} </div>
114114
<div className="flex-1 border-b border-gray-10"> {React.string(j`\\u00A0`)} </div>
115115
</div>
116116
<div
117-
className="px-4 text-14 pb-4 pt-4 overflow-x-auto bg-gray-5 border-gray-10 xs:rounded-b border border-t-1">
117+
className="px-4 lg:px-5 text-14 pb-4 pt-4 overflow-x-auto bg-gray-5 border-gray-10 xs:rounded-b-lg border">
118118
<pre> children </pre>
119119
</div>
120120
</div>

src/components/Markdown.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Markdown.res

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module P = {
55
@react.component
6-
let make = (~children) => <p className="md-p leading-5 text-gray-80 text-16"> children </p>
6+
let make = (~children) => <p className="md-p md:leading-5 text-gray-80 md:text-16"> children </p>
77
}
88

99
// Used for hero like introduction text in
@@ -83,11 +83,12 @@ module UrlBox = {
8383
</a>
8484
} else {
8585
<Next.Link href>
86-
<a className="flex items-center"> {React.string(text)} <Icon.ArrowRight className="ml-1" /> </a>
86+
<a className="flex items-center">
87+
{React.string(text)} <Icon.ArrowRight className="ml-1" />
88+
</a>
8789
</Next.Link>
8890
}
89-
<div
90-
className="md-url-box text-base border-l-2 border-gray-60 my-6 py-6 pl-8 pr-10 bg-gray-5">
91+
<div className="md-url-box text-base border-l-2 border-gray-60 my-6 py-6 pl-8 pr-10 bg-gray-5">
9192
content <div className="mt-4 text-sky hover:text-sky-30"> link </div>
9293
</div>
9394
}
@@ -113,17 +114,21 @@ module Anchor = {
113114
}
114115
}
115116
// HEADLINES //
117+
116118
module H1 = {
117119
@react.component
118120
let make = (~children) =>
119-
<h1 className="text-42 tracking-tight leading-1 mb-5 font-sans font-medium text-gray-95"> children </h1>
121+
<h1 className="text-42 tracking-tight leading-1 mb-5 font-sans font-medium text-gray-95">
122+
children
123+
</h1>
120124
}
121125

122126
module H2 = {
123127
@react.component
124128
let make = (~id, ~children) => <>
125129
// Here we know that children is always a string (## headline)
126-
<h2 className="group mt-12 mb-3 text-28 tracking-tight leading-1 font-sans font-bold text-gray-95">
130+
<h2
131+
className="group mt-12 mb-3 text-28 tracking-tight leading-1 font-sans font-bold text-gray-95">
127132
children <span className="ml-2"> <Anchor id /> </span>
128133
</h2>
129134
</>
@@ -132,7 +137,8 @@ module H2 = {
132137
module H3 = {
133138
@react.component
134139
let make = (~id, ~children) =>
135-
<h3 className="group text-21 mt-12 mb-3 tracking-tight leading-3 font-sans font-bold text-gray-95">
140+
<h3
141+
className="group text-21 mt-12 mb-3 tracking-tight leading-3 font-sans font-bold text-gray-95">
136142
children <span className="ml-2"> <Anchor id /> </span>
137143
</h3>
138144
}
@@ -141,16 +147,15 @@ module H4 = {
141147
@react.component
142148
let make = (~id, ~children) =>
143149
<h4 className="group text-18 mt-12 mb-3 leading-2 font-sans font-semibold text-gray-95">
144-
children
145-
<span className="ml-2"> <Anchor id /> </span>
150+
children <span className="ml-2"> <Anchor id /> </span>
146151
</h4>
147152
}
148153

149154
module H5 = {
150155
@react.component
151156
let make = (~id, ~children) =>
152157
<h5
153-
className="group mt-12 mb-3 text-12 leading-2 font-sans font-semibold uppercase tracking-wide text-gray-95">
158+
className="group mt-12 mb-3 text-12 leading-2 font-sans font-semibold uppercase tracking-wide text-gray-80">
154159
children <span className="ml-2"> <Anchor id /> </span>
155160
</h5>
156161
}
@@ -163,7 +168,9 @@ module Pre = {
163168
module InlineCode = {
164169
@react.component
165170
let make = (~children) =>
166-
<code className="md-inline-code py-0.75 px-2 text-smaller-1 rounded border-gray-100 font-mono bg-gray-10">
171+
<code
172+
className="md-inline-code py-0.75 px-2 text-smaller-1 font-medium rounded font-mono bg-gray-10-tr">
173+
//text-smaller-1
167174
children
168175
</code>
169176
}
@@ -285,14 +292,12 @@ module Code = {
285292
}
286293

287294
module CodeTab = {
288-
let getMdxMetastring: Mdx.mdxComponent => option<string> = %raw(
289-
"element => {
295+
let getMdxMetastring: Mdx.mdxComponent => option<string> = %raw("element => {
290296
if(element == null || element.props == null) {
291297
return;
292298
}
293299
return element.props.metastring;
294-
}"
295-
)
300+
}")
296301
@react.component
297302
let make = (~children: Mdx.MdxChildren.t, ~labels: array<string>=[]) => {
298303
let mdxElements = switch Mdx.MdxChildren.classify(children) {
@@ -372,7 +377,7 @@ module A = {
372377
let make = (~href, ~target=?, ~children) =>
373378
// In case we are handling a relative URL, we will use the Next routing
374379
if Util.Url.isAbsolute(href) {
375-
<a href rel="noopener noreferrer" className="no-underline text-fire-70 hover:underline" ?target>
380+
<a href rel="noopener noreferrer" className="no-underline text-fire hover:underline" ?target>
376381
children
377382
</a>
378383
} else {

src/components/NameInitialsAvatar.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/NameInitialsAvatar.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ let make = (~displayName: string) => {
88
}
99

1010
<div className="block uppercase h-full w-full flex items-center justify-center rounded-full">
11-
<span className="text-xl text-gray-80"> {React.string(initials)} </span>
11+
<span className="text-21 text-gray-80"> {React.string(initials)} </span>
1212
</div>
1313
}

src/layouts/LandingPageLayout.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/layouts/LandingPageLayout.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ let make = (~components=Markdown.default, ~children) => {
4848
<div className="flex justify-center">
4949
<div className="w-full max-w-740">
5050
<div>
51-
<h1 className="text-80 xs:text-100 text-gray-95 font-semibold">
51+
<h1 className="text-56 xs:text-96 text-gray-95 tracking-tight font-semibold">
5252
{React.string("ReScript")}
5353
</h1>
5454
<p className="text-21 text-gray-95 font-bold mb-2">

tailwind.config.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = {
4747
"95": "#0A0D2F",
4848
"100": "#010427",
4949
"5-tr": "rgba(1, 20, 29, 0.02)",
50-
"10-tr": "rgba(1, 4, 39, 0.1)",
50+
"10-tr": "rgba(1, 16, 39, 0.05)",
5151
"20-tr": "rgba(1, 4, 39, 0.2)",
5252
"40-tr": "rgba(1, 4, 39, 0.4)",
5353
"60-tr": "rgba(1, 4, 39, 0.6)",
@@ -110,7 +110,7 @@ module.exports = {
110110
spacing: {
111111
"2/3": "66.666667%",
112112
"9/16": "56.25%",
113-
"0.75": "0.1875rem"
113+
"0.75": "0.135rem"
114114
},
115115
animation: {
116116
pulse: 'pulse 0.5s cubic-bezier(0.4, 0, 0.6, 1)',
@@ -144,26 +144,17 @@ module.exports = {
144144
"12": "0.75rem",
145145
"14": "0.875rem",
146146
"16": "1rem",
147-
"18": "1rem",
147+
"18": "1.125rem",
148148
"21": "1.3125rem",
149149
"28": "1.5rem",
150150
"32": "2rem",
151151
"42": "2.625rem",
152-
"48": "3rem",
153-
"80": "5rem",
154-
"100": "6.25rem",
152+
"56": "3.5rem",
153+
"96": "6rem",
155154
"smaller-1": "0.9em", // 18px => 16.2px (used for inlineCode)
156-
xs: ".75rem", // 12px
157155
sm: ".875rem", // 14px
158156
base: "1rem", // 16px
159157
lg: "1.125rem", // 18px
160-
xl: "1.3125rem", // 21px
161-
"2xl": "1.5rem", // 24px
162-
"3xl": "2rem", // 32px
163-
"4xl": "2.125rem", // 34px
164-
"5xl": "2.25rem", // 36px
165-
"6xl": "2.625rem", // 42px
166-
"7xl": "4.875rem" // 78px
167158
},
168159
fontWeight: {
169160
normal: 400,

0 commit comments

Comments
 (0)