|
5 | 5 | */ |
6 | 6 | @import './ode-tokens.css'; |
7 | 7 |
|
| 8 | +/* Self-hosted Josefin Sans font faces */ |
8 | 9 | @font-face { |
9 | | - font-family: 'Noto Sans'; |
| 10 | + font-family: 'Josefin Sans'; |
| 11 | + font-style: normal; |
| 12 | + font-weight: 300; |
| 13 | + font-display: swap; |
| 14 | + src: url('/fonts/JosefinSans-Light.woff2') format('woff2'); |
| 15 | +} |
| 16 | + |
| 17 | +@font-face { |
| 18 | + font-family: 'Josefin Sans'; |
10 | 19 | font-style: normal; |
11 | 20 | font-weight: 400; |
12 | 21 | font-display: swap; |
13 | | - src: url('/fonts/NotoSans-Regular.woff2') format('woff2'), |
14 | | - url('/fonts/NotoSans-Regular.ttf') format('truetype'); |
| 22 | + src: url('/fonts/JosefinSans-Regular.woff2') format('woff2'); |
| 23 | +} |
| 24 | + |
| 25 | +@font-face { |
| 26 | + font-family: 'Josefin Sans'; |
| 27 | + font-style: normal; |
| 28 | + font-weight: 500; |
| 29 | + font-display: swap; |
| 30 | + src: url('/fonts/JosefinSans-Medium.woff2') format('woff2'); |
| 31 | +} |
| 32 | + |
| 33 | +@font-face { |
| 34 | + font-family: 'Josefin Sans'; |
| 35 | + font-style: normal; |
| 36 | + font-weight: 600; |
| 37 | + font-display: swap; |
| 38 | + src: url('/fonts/JosefinSans-SemiBold.woff2') format('woff2'); |
| 39 | +} |
| 40 | + |
| 41 | +@font-face { |
| 42 | + font-family: 'Josefin Sans'; |
| 43 | + font-style: normal; |
| 44 | + font-weight: 700; |
| 45 | + font-display: swap; |
| 46 | + src: url('/fonts/JosefinSans-SemiBold.woff2') format('woff2'); |
15 | 47 | } |
16 | 48 |
|
17 | 49 | :root { |
|
24 | 56 | --navbar-text-color-light: var(--ode-color-neutral-600); |
25 | 57 | --navbar-border-top: var(--ode-color-neutral-900); |
26 | 58 | --navbar-border-bottom: var(--ifm-color-primary); |
| 59 | + |
| 60 | + /* Set Josefin Sans as the default font for all body text */ |
| 61 | + --ifm-font-family-base: var(--ode-font-family-sans); |
27 | 62 | } |
28 | 63 |
|
29 | 64 | [data-theme='dark'] { |
@@ -810,3 +845,100 @@ html[data-theme='dark'] .alert { |
810 | 845 | .markdown > .cards:last-child { |
811 | 846 | margin-bottom: 0; |
812 | 847 | } |
| 848 | + |
| 849 | +/* ============================================ |
| 850 | + TYPOGRAPHY - Apply Josefin Sans to all body text |
| 851 | + ============================================ */ |
| 852 | + |
| 853 | +/* Apply Josefin Sans to body and all text elements */ |
| 854 | +body, |
| 855 | +html { |
| 856 | + font-family: var(--ode-font-family-sans); |
| 857 | + font-weight: var(--ode-font-weight-body); |
| 858 | +} |
| 859 | + |
| 860 | +/* Apply body text weight to regular text elements */ |
| 861 | +p, |
| 862 | +li, |
| 863 | +td, |
| 864 | +th, |
| 865 | +span, |
| 866 | +div, |
| 867 | +label, |
| 868 | +input, |
| 869 | +textarea, |
| 870 | +select { |
| 871 | + font-family: var(--ode-font-family-sans); |
| 872 | + font-weight: var(--ode-font-weight-body); |
| 873 | +} |
| 874 | + |
| 875 | +/* Links use body weight */ |
| 876 | +a { |
| 877 | + font-family: var(--ode-font-family-sans); |
| 878 | + font-weight: var(--ode-font-weight-link); |
| 879 | +} |
| 880 | + |
| 881 | +/* Main headings (h1, h2, h3) use primary heading weight */ |
| 882 | +h1, h2, h3 { |
| 883 | + font-family: var(--ode-font-family-sans); |
| 884 | + font-weight: var(--ode-font-weight-heading-primary); |
| 885 | +} |
| 886 | + |
| 887 | +/* Subheadings (h4, h5, h6) use secondary heading weight */ |
| 888 | +h4, h5, h6 { |
| 889 | + font-family: var(--ode-font-family-sans); |
| 890 | + font-weight: var(--ode-font-weight-heading-secondary); |
| 891 | +} |
| 892 | + |
| 893 | +/* Buttons use button weight */ |
| 894 | +button { |
| 895 | + font-family: var(--ode-font-family-sans); |
| 896 | + font-weight: var(--ode-font-weight-button); |
| 897 | +} |
| 898 | + |
| 899 | +/* Ensure code elements always use monospace fonts */ |
| 900 | +code, |
| 901 | +pre, |
| 902 | +kbd, |
| 903 | +samp, |
| 904 | +var, |
| 905 | +.code-block, |
| 906 | +.prism-code, |
| 907 | +.token, |
| 908 | +.hljs, |
| 909 | +[class*="codeBlock"], |
| 910 | +[class*="code-block"] { |
| 911 | + font-family: var(--ode-font-family-mono) !important; |
| 912 | +} |
| 913 | + |
| 914 | +/* Docusaurus specific code elements */ |
| 915 | +.theme-doc-markdown code, |
| 916 | +.theme-doc-markdown pre code, |
| 917 | +.margin-top--md code, |
| 918 | +.margin-bottom--md code { |
| 919 | + font-family: var(--ode-font-family-mono) !important; |
| 920 | +} |
| 921 | + |
| 922 | +/* Ensure Docusaurus markdown content uses token-based font weights */ |
| 923 | +.theme-doc-markdown p, |
| 924 | +.theme-doc-markdown li, |
| 925 | +.theme-doc-markdown td, |
| 926 | +.theme-doc-markdown span, |
| 927 | +.theme-doc-markdown div, |
| 928 | +.theme-doc-markdown a:not(.hash-link) { |
| 929 | + font-weight: var(--ode-font-weight-body); |
| 930 | +} |
| 931 | + |
| 932 | +/* Main headings in markdown */ |
| 933 | +.theme-doc-markdown h1, |
| 934 | +.theme-doc-markdown h2, |
| 935 | +.theme-doc-markdown h3 { |
| 936 | + font-weight: var(--ode-font-weight-heading-primary); |
| 937 | +} |
| 938 | + |
| 939 | +/* Subheadings in markdown */ |
| 940 | +.theme-doc-markdown h4, |
| 941 | +.theme-doc-markdown h5, |
| 942 | +.theme-doc-markdown h6 { |
| 943 | + font-weight: var(--ode-font-weight-heading-secondary); |
| 944 | +} |
0 commit comments