SlideShare a Scribd company logo
1 of 30
Download to read offline
Typografická sazba
Václav Kijonka
frontend designer/developer
vaclav.kijonka@gmail.com
twitter: @vaclavkijonka
facebook: vaclav.kijonka
instagram: vaclav.kijonka
Písmo
je nejvýznamnější projev sdělení už 5000 let
tvoří

90 %

obsahu na webu
Čím více člověk čte,
tím více dává 

textovému obsahu váhu.
https://i.iinfo.cz/files/iac/463/iac-2017-netmonitor-rocenka-2016-1.pdf
Čitelná, harmonická

(první dojem, návratnost)
Adaptivní 

(uživatel, zařízení)
Jednoduchá 

(tvorba, úpravy)
Základní nastavení
Typografická mřížka
Layout + responsive
Základní velikost písma
:root {
font-size: 16px;
font-size: 100%;
}
Definováním základní velikosti písma v absolutních jednotkách ničíme
možnosti uživatelského rozhraní v jeho vybraném prohlížeči.
V ČR je cca 74 zrakově postižených lidí, ve světě 285 miliónů

(http://poslepu.cz/kolik-je-v-ceske-republice-zrakove-postizenych-lidi/).
Sekané přizpůsobení
html {
font-size: 100%;
@media (min-width: 40em) {
font-size: 110%;
}
@media (min-width: 60em) {
font-size: 120%;
}
}
Dynamicky
html {
font-size: calc(1em + 1vh);
}
Testujte 320 px — 3840 px.
320 px: 16 + 3.2px = 19,2 px
3840 px: 16 + 38.4 px = 54,4 px
„Jednoduchý vzoreček“
@font-size-base: calc(
@fs-min-u
+ ((100 / @fs-min * @fs-max) - 100) // 50%
* ((100vw - @fs-min-ss-u) / (@fs-max-ss - @fs-min-ss))
// 320px = ((100vw - 20em) / (3520)) = 0
// 3840px = ((100vw - 20em) / (3520)) = 1
);
@fs-min-u: 100%; // Min. FS with unit
@fs-min: 16; // Min. FS (like px)
@fs-max: 24; // Max. FS (like px)
@fs-min-ss-u: 20em; // Min. SS unit
@fs-min-ss: 320; // Min. SS (like px)
@fs-max-ss: 3840; // Max. SS (like px)
Bez @media queries
html {
font-size: 100%;//Opera Mini, < IE 11
font-size: @font-size-base;
}
320 px (16 px) — 3840 px (24 px)
https://css-tricks.com/snippets/css/fluid-typography/
Každé písmo je jiné
https://iamvdo.me/en/blog/css-font-metrics-line-height-and-vertical-align
Velikostní sada písem
@font-size-h1: 2.60(em);
@font-size-h2: 1.80(em);
@font-size-h3: 1.40(em);
@font-size-h4: 1.20(em);
@font-size-h5: 1.10(em);
@font-size-h6: 1.00(em);
@font-size-large: 1.15(em);
@font-size-base: 1.00(em);
@font-size-small: .85(em);
https://www.modularscale.com/
Výška řádku
Excepteur sint
occaecat cupidatat
non proident
Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore
et dolore magna aliqua.
Excepteur sint
occaecat cupidatat 

non proident
Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore
et dolore magna aliqua.
Rovnoměrný přírustek
@line-height-base: 1.5;
.font(@font-size) {
font-size: unit(@font-size, em);
line-height: (1 + ((@line-height-base - 1) / @font-size));
// fs: 16px = lh: 24px, přírustek 8px, lh: 1.5
// fs: 32px = lh: 40px, přírustek 8px, lh: 1.25
}
h1 {
.font(@font-size-h1);
}
.size-lg {
.font(@font-size-lg);
}
Harmonický grid systém
Vertikální rytmus
@gap: (1rem * @line-height-base);
@gap-200: (@gap * 2);
@gap-175: (@gap * 1.75);
@gap-150: (@gap * 1.5);
@gap-125: (@gap * 1.25);
@gap-75: (@gap * .75);
@gap-50: (@gap * .5);
@gap-25: (@gap * .25);
Typografické bloky
Body text
Nadpisy
Zmenšené a „featured“
Interakční (navigace, odkazy,
tlačítka, formuláře, …)
Tabulkové
Technické
Značky, labely (UI), …
Reklamy
Ukázka
h1 {
margin-top: @gap-200;
.font(@font-size-h1)
}
h2 {
margin-top: @gap-150;
.font(@font-size-h2)
}
… {…}
:root {
font-size: 100%;
}
body {
font-size: @font-size-base;
line-height: @line-height-base;
}
p,
ul,
table, … {
margin-top: @gap;
}
Formulářové prvky
@form-padding: unit(@gap-25, em) unit(@gap-50, em);
button,
.button,
input[type="abc"],
optgroup,
select,
textarea {
border: .0625em solid gray;
border: 1px solid gray;
.font(@font-size-base);
padding: @form-padding;
}
Komponenty
.card {
margin: @gap auto 0;
padding: @gap-50 @gap;
}
.card > *:not(:first-child) {
margin-top: @gap-50;
}
<article class=“card”>
<header class=“card-header”>
<h2 class=“card-title”>Karta produktu</h2>
</header>
<div class=“card-content">
<figure>
<img src=“produkt.jpg" alt="Ipsum">
<figcaption>Lorem</figcaption>
</figure>
<p>Lorem ipsum dolor sit amet…</p>
</div>
<footer class="card-footer">
<a class="button size-lg" href="#">Koupit</a>
</footer>
</article>
Layout & responsive
Pokud respektujeme uživatelské
nastavení velikosti fontu, definujeme
layout i breakpointy v pružných
jednotkách em.
https://zellwk.com/blog/media-query-units/
https://adamwathan.me/dont-use-em-for-media-queries/
Layout
@container-width: 60em;
.container {
width: @container-width;
max-width: 100%;
}
Responsive
.card {
@media (min-width: 40em) {
width: percentage(1/2);
}
@media (min-width: 60em) {
width: percentage(1/3);
}
}
Doporučení
https://practice.typekit.com/lesson/caring-about-opentype-features/
https://www.zachleat.com/web/font-checklist/
Vytvářejte si systém
Používejte proměnné
Jak interpretovat

grafický návrh?
PSD je drahá skica — velká míra improvizace.
Figma/Sketch + InVision — high-fidelity prototyp.
Ani jedna z aplikací není browser.
Finální design laďte na frontendu, ne podle pixelů z návrhu.
Vzdělání
Typografická pravidla na ÚJČ
Matematika jako vzorec harmonie
HCD + UX
Koho sleduji?
Heydon Pickering
Paul Boagh
Sara Soueidan
Amber Weinberg
Díky,
těším se na diskuzi
:-)

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Typografie a sazba na webu