Skip to content

Commit

Permalink
Use custom font
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Jul 19, 2023
1 parent 37e3b69 commit 6e1b1c0
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 8 deletions.
1 change: 0 additions & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<meta property="og:image" content="/Ruff.png" />
<link rel="canonical" href="https://play.ruff.rs" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
<script
src="https://cdn.usefathom.com/script.js"
data-site="XWUDIXNB"
Expand Down
Binary file added playground/public/fonts/Alliance-PlattMedium.otf
Binary file not shown.
Binary file added playground/public/fonts/Alliance-PlattMedium.woff
Binary file not shown.
Binary file not shown.
Binary file added playground/public/fonts/Alliance-PlattRegular.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added playground/public/fonts/Alliance-TextMedium.otf
Binary file not shown.
Binary file added playground/public/fonts/Alliance-TextMedium.woff
Binary file not shown.
Binary file added playground/public/fonts/Alliance-TextMedium.woff2
Binary file not shown.
Binary file not shown.
Binary file added playground/public/fonts/Alliance-TextRegular.woff
Binary file not shown.
Binary file not shown.
11 changes: 8 additions & 3 deletions playground/src/Editor/AstralButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,21 @@ export default function AstralButton({
return (
<button
className={classNames(
"uppercase",
"ease-in-out",
"font-heading",
"transition-all duration-200",
"bg-radiate",
"text-black",
"hover:text-radiate",
"hover:text-white",
"hover:bg-galaxy",
"outline-1",
"dark:outline",
"dark:hover:outline-radiate",
"dark:hover:outline-white",
"rounded-md",
"tracking-[.08em]",
"text-sm",
"font-semibold",
"font-medium",
"enabled:hover:bg-galaxy",
className,
)}
Expand Down
38 changes: 38 additions & 0 deletions playground/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ html,
margin: 0;
height: 100%;
width: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.shadow-copied {
Expand All @@ -23,3 +25,39 @@ html,
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

@font-face {
font-family: "Alliance Text";
src: url("../public/fonts/Alliance-TextRegular.woff2") format("woff2"),
url("../public/fonts/Alliance-TextRegular.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: block;
}

@font-face {
font-family: "Alliance Text";
src: url("../public/fonts/Alliance-TextMedium.woff2") format("woff2"),
url("../public/fonts/Alliance-TextMedium.woff") format("woff");
font-weight: 500;
font-style: normal;
font-display: block;
}

@font-face {
font-family: "Alliance Platt";
src: url("../public/fonts/Alliance-PlattMedium.woff2") format("woff2"),
url("../public/fonts/Alliance-PlattMedium.woff") format("woff");
font-weight: 500;
font-style: normal;
font-display: block;
}

@font-face {
font-family: "Alliance Platt";
src: url("../public/fonts/Alliance-PlattRegular.woff2") format("woff2"),
url("../public/fonts/Alliance-PlattRegular.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: block;
}
58 changes: 54 additions & 4 deletions playground/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,65 @@ module.exports = {
DEFAULT: "#f8f9fa",
dark: "#0b0e14",
},
black: "#261230",
white: "#FFFFFF",
radiate: "#D7FF64",
flare: "#6340AC",
rock: "#78876E",
galaxy: "#261230",
space: "#30173D",
starlight: "#F4F4F1",
comet: "#6F5D6F",
cosmic: "#DE5FE9",
sun: "#FFAC2F",
electron: "#46EBE1",
aurora: "#46EB74",
constellation: "#5F6DE9",
neutron: "#CFF3CF",
proton: "#F6AFBC",
nebula: "#CDCBFB",
rock: "#78876E",
radiate: "#D7FF64",
supernova: "#F1AFF6",
starlight: "#F4F4F1",
lunar: "#FBF2FC",
asteroid: "#E3CEE3",
crater: "#F0DFDF",
},
fontFamily: {
sans: ["Inter var", ...defaultTheme.fontFamily.sans],
heading: [
"Alliance Platt",
"system-ui",
"-apple-system",
"Segoe UI",
"Roboto",
"Helvetica",
"Arial",
"monospace",
"Apple Color Emoji",
"Segoe UI Emoji",
],
body: [
"Alliance Text",
"system-ui",
"-apple-system",
"Segoe UI",
"Roboto",
"Helvetica",
"Arial",
"sans-serif",
"Apple Color Emoji",
"Segoe UI Emoji",
],
mono: ["Roboto Mono"],
},
fontSize: {
xs: "0.75rem" /* 12px */,
sm: "0.875rem" /* 14px */,
base: "1rem" /* 16px */,
lg: "1.125rem" /* 18px */,
xl: "1.25rem" /* 20px */,
"2xl": "1.5rem" /* 25px */,
"3xl": "1.875rem" /* 30px */,
"4xl": "2.25rem" /* 36px */,
"5xl": "3rem" /* 48px */,
},
},
},
Expand Down

0 comments on commit 6e1b1c0

Please sign in to comment.