diff --git a/CHANGELOG.md b/CHANGELOG.md index d3c5cc7..38b64fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ * Focus important fields on forms * Improve session list (https://git.kucharczyk.xyz/lukas/timetracker/issues/53) * Change fonts to IBM Plex -* Only use local font files +* Only use local WOFF2 font files ## 1.0.3 / 2023-02-20 17:16+01:00 diff --git a/common/input.css b/common/input.css index 18bb86e..3be0629 100644 --- a/common/input.css +++ b/common/input.css @@ -4,14 +4,21 @@ @font-face { font-family: "IBM Plex Mono"; - src: url("fonts/IBMPlexMono-regular.ttf") format("truetype"); + src: url("fonts/IBMPlexMono-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; } @font-face { font-family: "IBM Plex Sans"; - src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype"); + src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "IBM Plex Serif"; + src: url("fonts/IBMPlexSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; } diff --git a/games/static/base.css b/games/static/base.css index 9466cbb..e53d77e 100644 --- a/games/static/base.css +++ b/games/static/base.css @@ -785,10 +785,6 @@ select { margin-bottom: 1rem; } -.ml-1 { - margin-left: 0.25rem; -} - .mr-4 { margin-right: 1rem; } @@ -817,14 +813,6 @@ select { display: none; } -.h-4 { - height: 1rem; -} - -.h-5 { - height: 1.25rem; -} - .h-6 { height: 1.5rem; } @@ -833,22 +821,10 @@ select { min-height: 100vh; } -.w-4 { - width: 1rem; -} - -.w-5 { - width: 1.25rem; -} - .w-6 { width: 1.5rem; } -.w-7 { - width: 1.75rem; -} - .w-full { width: 100%; } @@ -883,14 +859,6 @@ select { align-items: center; } -.justify-end { - justify-content: flex-end; -} - -.justify-center { - justify-content: center; -} - .justify-between { justify-content: space-between; } @@ -899,20 +867,12 @@ select { align-self: center; } -.overflow-hidden { - overflow: hidden; -} - .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } -.text-ellipsis { - text-overflow: ellipsis; -} - .whitespace-nowrap { white-space: nowrap; } @@ -930,21 +890,11 @@ select { border-color: rgb(229 231 235 / var(--tw-border-opacity)); } -.bg-blue-600 { - --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity)); -} - .bg-green-600 { --tw-bg-opacity: 1; background-color: rgb(22 163 74 / var(--tw-bg-opacity)); } -.bg-red-600 { - --tw-bg-opacity: 1; - background-color: rgb(220 38 38 / var(--tw-bg-opacity)); -} - .bg-white { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); @@ -985,6 +935,14 @@ select { font-family: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } +.font-serif { + font-family: IBM Plex Serif, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; +} + +.font-sans { + font-family: IBM Plex Sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + .text-4xl { font-size: 2.25rem; line-height: 2.5rem; @@ -1005,13 +963,55 @@ select { line-height: 1rem; } +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + +.text-9xl { + font-size: 8rem; + line-height: 1; +} + +.text-8xl { + font-size: 6rem; + line-height: 1; +} + +.text-7xl { + font-size: 4.5rem; + line-height: 1; +} + +.text-6xl { + font-size: 3.75rem; + line-height: 1; +} + +.text-5xl { + font-size: 3rem; + line-height: 1; +} + +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + .font-semibold { font-weight: 600; } -.text-red-400 { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); +.font-bold { + font-weight: 700; +} + +.capitalize { + text-transform: capitalize; +} + +.italic { + font-style: italic; } .text-slate-300 { @@ -1047,12 +1047,6 @@ select { transition-duration: 150ms; } -.transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - .duration-200 { transition-duration: 200ms; } @@ -1072,7 +1066,7 @@ select { @font-face { font-family: "IBM Plex Mono"; - src: url("fonts/IBMPlexMono-regular.ttf") format("truetype"); + src: url("fonts/IBMPlexMono-regular.woff2") format("woff2"); font-weight: 400; @@ -1082,7 +1076,17 @@ select { @font-face { font-family: "IBM Plex Sans"; - src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype"); + src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); + + font-weight: 400; + + font-style: normal; +} + +@font-face { + font-family: "IBM Plex Serif"; + + src: url("fonts/IBMPlexSerif-Regular.woff2") format("woff2"); font-weight: 400; @@ -1237,21 +1241,11 @@ th label { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } -.hover\:bg-blue-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(29 78 216 / var(--tw-bg-opacity)); -} - .hover\:bg-green-700:hover { --tw-bg-opacity: 1; background-color: rgb(21 128 61 / var(--tw-bg-opacity)); } -.hover\:bg-red-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(185 28 28 / var(--tw-bg-opacity)); -} - .hover\:underline:hover { text-decoration-line: underline; } @@ -1267,21 +1261,11 @@ th label { box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); } -.focus\:ring-blue-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity)); -} - .focus\:ring-green-500:focus { --tw-ring-opacity: 1; --tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity)); } -.focus\:ring-red-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity)); -} - .focus\:ring-offset-2:focus { --tw-ring-offset-width: 2px; } @@ -1300,11 +1284,6 @@ th label { background-color: rgb(17 24 39 / var(--tw-bg-opacity)); } -:is(.dark .dark\:text-slate-400) { - --tw-text-opacity: 1; - color: rgb(148 163 184 / var(--tw-text-opacity)); -} - :is(.dark .dark\:text-slate-600) { --tw-text-opacity: 1; color: rgb(71 85 105 / var(--tw-text-opacity)); diff --git a/games/static/fonts/IBMPlexMono-Regular.ttf b/games/static/fonts/IBMPlexMono-Regular.ttf deleted file mode 100644 index 81ca3dc..0000000 Binary files a/games/static/fonts/IBMPlexMono-Regular.ttf and /dev/null differ diff --git a/games/static/fonts/IBMPlexMono-Regular.woff2 b/games/static/fonts/IBMPlexMono-Regular.woff2 new file mode 100644 index 0000000..84c87e0 Binary files /dev/null and b/games/static/fonts/IBMPlexMono-Regular.woff2 differ diff --git a/games/static/fonts/IBMPlexSans-Regular.ttf b/games/static/fonts/IBMPlexSans-Regular.ttf deleted file mode 100644 index b581964..0000000 Binary files a/games/static/fonts/IBMPlexSans-Regular.ttf and /dev/null differ diff --git a/games/static/fonts/IBMPlexSans-Regular.woff2 b/games/static/fonts/IBMPlexSans-Regular.woff2 new file mode 100644 index 0000000..739bc68 Binary files /dev/null and b/games/static/fonts/IBMPlexSans-Regular.woff2 differ diff --git a/games/static/fonts/IBMPlexSerif-Regular.woff2 b/games/static/fonts/IBMPlexSerif-Regular.woff2 new file mode 100644 index 0000000..f295ba8 Binary files /dev/null and b/games/static/fonts/IBMPlexSerif-Regular.woff2 differ diff --git a/tailwind.config.js b/tailwind.config.js index f21b94d..8047bc1 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -8,6 +8,7 @@ module.exports = { fontFamily: { 'sans': ['IBM Plex Sans', ...defaultTheme.fontFamily.sans], 'mono': ['IBM Plex Mono', ...defaultTheme.fontFamily.mono], + 'serif': ['IBM Plex Serif', ...defaultTheme.fontFamily.serif], } }, },