The outer display type dictates
how the box participates in its
parent’s formatting context.
<display-outside> = block
inline
run-in
Slide 17
Slide 18
Slide 19
The outer display type dictates
how the box participates in its
parent’s formatting context.
<display-outside> = block
inline
run-in
Slide 20
The inner display type defines
the kind of formatting context
it generates, dictating how its
descendant boxes are laid out.
<display-inside> = flow flex
flow-root grid
table ruby
SYSTEMS LIKE
MONGOLIAN
block
direction
inline direction
Slide 53
SYSTEMS LIKE MONGOLIAN
block
direction
inline direction
Slide 54
HAN-BASED SYSTEMS
block
direction
inline direction
*Chinese, Japanese, Korean & more
Slide 55
HAN-BASED SYSTEMS
block
direction
inline direction
block
direction
inline direction
*Chinese, Japanese, Korean & more
Slide 56
Slide 57
Slide 58
Slide 59
HAN-BASED SYSTEMS
block
direction
inline direction
block
direction
inline direction
*Chinese, Japanese, Korean & more
Slide 60
writing-mode
Slide 61
THREE OPTIONS FOR WRITING-MODE
writing-mode:
vertical-lr;
writing-mode:
vertical-rl;
toggle w/
dir
writing-mode:
horizontal-tb;
Slide 62
Slide 63
HAN-BASED SYSTEMS
*Chinese, Japanese, Korean & more
writing-mode:
horizontal-tb;
writing-mode:
vertical-rl;
Slide 64
chenhuijing.com/zh-type
Slide 65
chenhuijing.com/blog/chinese-web-typography
Slide 66
Slide 67
Slide 68
HAN-BASED SYSTEMS
*Chinese, Japanese, Korean & more
writing-mode:
horizontal-tb;
writing-mode:
vertical-rl;
Slide 69
Slide 70
h1:nth-child(2) {
writing-mode: vertical-rl;
}
Slide 71
Slide 72
h1:nth-child(2) {
writing-mode: ???;
}
Slide 73
text flowing
like this
writing-mode: vertical-rl;
Slide 74
NOPE!
text flowing
like this
writing-mode: vertical-lr;
text flowing
like this
writing-mode: vertical-rl;
Slide 75
like this
text flowing
text flowing
like this
SYSTEMS LIKE MONGOLIAN
HAN-BASED SYSTEMS
Slide 76
SYSTEMS LIKE MONGOLIAN
Slide 77
SYSTEMS LIKE MONGOLIAN
Slide 78
Block
Start
Top of
Horizontal
scripts
hello
A
Slide 79
like this
text flowing
text flowing
like this
SYSTEMS LIKE MONGOLIAN
HAN-BASED SYSTEMS
Slide 80
section {
writing-mode: vertical-rl;
}
(This triggers
text-orientation: mixed
as the default.)
Example:
Writing Mode 1A
Slide 81
Slide 82
section {
writing-mode: vertical-lr;
}
Example:
Writing Mode 1A
Slide 83
Slide 84
THREE OPTIONS FOR WRITING-MODE
direction
block
inline direction
writing-mode:
vertical-lr;
block
direction
inline direction
writing-mode:
vertical-rl;
block
direction
inline direction
toggle w/
dir
writing-mode:
horizontal-tb;
creates a
vertical
typographic mode
Slide 85
TWO MORE (FUTURE) OPTIONS FOR WRITING-MODE
block
direction
inline direction
writing-mode:
sideways-lr;
block
direction
inline direction
writing-mode:
sideways-rl;
creates a
horizontal
typographic mode
only
A
A
Slide 86
section {
writing-mode: sideways-rl;
}
Example:
Writing Mode 1A
Slide 87
section {
writing-mode: sideways-lr;
}
Example:
Writing Mode 1A
Slide 88
block
direction
inline direction
writing-mode:
sideways-rl;
block
direction
inline direction
writing-mode:
vertical-rl;
A
È
Slide 89
direction
block
inline direction
writing-mode:
vertical-lr;
block
direction
inline direction
writing-mode:
sideways-lr;
A
Slide 90
creates a
vertical
typographic mode
THREE OPTIONS FOR WRITING-MODE
direction
block
inline direction
writing-mode:
vertical-lr;
block
direction
inline direction
writing-mode:
vertical-rl;
block
direction
inline direction
toggle w/
dir
writing-mode:
horizontal-tb;
Slide 91
My Cool Website
Slide 92
My Cool Website
how?
Slide 93
My Cool Website
writing-mode: vertical-rl;
transform: rotate(180deg)
;
text-orientation: sideways;
(needed to fix punctuation / underlining)
text-align: right;
Slide 94
text-orientation
Slide 95
HAN-LIKE SYSTEMS
È
Slide 96
Slide 97
options for vertical
writing modes
text-orientation:
mixed;
text-orientation:
upright;
text-orientation:
sideways;
THREE OPTIONS FOR TEXT-ORIENTATION
Slide 98
Slide 99
Slide 100
section {
writing-mode: vertical-rl;
text-orientation: upright;
}
Example:
Writing Mode 1A
Slide 101
section {
writing-mode: vertical-lr;
text-orientation: upright;
}
Example:
Writing Mode 1A
Slide 102
block
direction
inline direction
writing-mode:
sideways-rl;
block
direction
inline direction
writing-mode:
vertical-rl;
text-orientation: mixed;
creates a
horizontal
typographic mode
creates a
vertical
typographic mode
Slide 103
My Cool Website
writing-mode: vertical-rl;
transform: rotate(180deg)
;
text-orientation: sideways;
(needed to fix punctuation / underlining)
text-align: right;
THREE OPTIONS FOR WRITING-MODE
direction
block
inline direction
writing-mode:
vertical-lr;
block
direction
inline direction
writing-mode:
vertical-rl;
block
direction
inline direction
toggle w/
direction
writing-mode:
horizontal-tb;
creates a
vertical
typographic mode
È
È
A
Slide 122
TWO MORE (FUTURE) OPTIONS FOR WRITING-MODE
block
direction
inline direction
writing-mode:
sideways-lr;
block
direction
inline direction
writing-mode:
sideways-rl;
creates a
horizontal
typographic mode
only
A
A
Slide 123
options for vertical
writing modes
text-orientation:
mixed;
text-orientation:
upright;
text-orientation:
sideways;
THREE OPTIONS FOR TEXT-ORIENTATION