-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed-slides.css
More file actions
113 lines (94 loc) · 2.28 KB
/
embed-slides.css
File metadata and controls
113 lines (94 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
https://blog.webdevsimplified.com/2022-08/css-viewport-units/
https://matthewjamestaylor.com/2-column-layouts
https://stackoverflow.com/questions/42239778/items-that-span-all-columns-rows-using-css-grid-layout
https://css-tricks.com/snippets/css/complete-guide-grid/
https://verpex.com/blog/website-tips/modern-layouts-using-css-grid
*/
body {
margin: 0 auto;
max-width: 36em;
padding: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
article.embed-slide {
border: 2px dotted #3E2A22;
height: fit-content;
}
/* Single-column slide (contains no left or right images) */
.slide {
border: 1px solid #3E2A22;
background-color: #C68996;
/* column-count: 2; */
/* column-width: 10em; */
/* column-rule: 1px solid gray; */
}
/* Two-column slide (contains left or right images) */
.slide:has(img.ds-right, img.ds-left) {
border: 1px solid blue;
background-color: lightblue;
column-count: 2;
column-width: 10em;
column-rule: 1px solid gray;
}
.rightimage {
break-before: column;
}
.slide p, div {
border: 1px solid gray;
border-radius: 1rem;
}
.slide img, video, embed {
/* max-height: 50vb; */
max-width: 100%;
}
/* slide with 1 image only */
p:only-child:has(img:only-child) {
border: 6px dashed red;
column-span: all;
}
/* image right */
p:has(img:only-child.ds-right) {
border: 6px dashed green;
break-before: column;
}
/* image left */
p:has(img:only-child.ds-left) {
border: 6px dashed green;
break-after: column;
}
/* image inline */
p:has(img:only-child.ds-inline) {
background-color: yellow;
padding: 1rem;
column-span: all;
}
/* image grid */
p:has(img + img:nth-child(2)) {
border: 6px solid violet;
background-color: pink;
display: grid;
img {
border: 3px dashed black;
max-height: 30vh;
}
/* https://css-tricks.com/exploring-css-grids-implicit-grid-and-auto-placement-powers/ */
img:nth-child(3):last-child {
grid-column-start: span 2;
}
img:nth-child(4) {
grid-column-start: 2;
}
}
/* blockquote */
.slide blockquote {
break-inside: avoid-column;
}
.slide blockquote p::before {
content: '❝';
font-size: larger;
margin-right: 0.25em;
}