Sun Sep 11 2022 07:55:36 GMT+0000 (UTC)
Saved by @MiaFolio #open-type #typography
#open-type #typography
#typography #open-type #guide
#css #open-props #typography
--font-size-{00-8} --font-size-fluid-{0-3} --font-weight-{1-9} --font-letterspacing-{0-7} --font-lineheight-{00-5}
--font-sans: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; --font-serif: ui-serif, serif; --font-mono: Dank Mono, Operator Mono, Inconsolata, Fira Mono, ui-monospace, SF Mono, Monaco, Droid Sans Mono, Source Code Pro, monospace;
#typography #opentype
#typography
#typography #typographic #features
#list #typography #css
li { -webkit-column-break-inside: avoid; page-break-inside: avoid; break-inside: avoid; }
#typography #css #fluid
html { font-size: min(max(1rem, 4vw), 22px); } /* or */ body { font-size: clamp(100%, 1rem + 2vw, 24px); } /* with variables */ h1 { --minFontSize: 32px; --maxFontSize: 200px; --scaler: 10vw; font-size: clamp( var(--minFontSize), var(--scaler), var(--maxFontSize) ); }
line-height: calc(2px + 2ex + 2px);
a[href="your url here"]{ background:red; }
.banner { width: clamp(200px, 50% + 20px, 800px); /* Yes, you can do math inside clamp()! */ }
p { display: -webkit-box; max-width: 200px; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
#typography #css #line-height
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments