-
Notifications
You must be signed in to change notification settings - Fork 843
/
Copy pathpositioning-inset.html
99 lines (81 loc) · 2 KB
/
positioning-inset.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>inset properties for positioning</title>
<link rel="stylesheet" href="../css-cookbook/styles.css">
<style>
.container {
display: flex;
}
.inner {
width: 200px;
height: 200px;
position: relative;
border: 2px dotted grey;
}
.box {
border: 2px solid rgb(96, 139, 168);
border-radius: 5px;
background-color: rgba(96, 139, 168, .2);
padding: 10px;
width: 100px;
height: 100px;
}
</style>
<style class="editable">
.inner {
writing-mode: horizontal-tb;
}
.physical {
position: absolute;
top: 20px;
right: 0;
}
.logical {
position: absolute;
inset-block-start: 20px;
inset-inline-end: 0;
}
</style>
</head>
<body>
<section class="preview">
<div class="container">
<div class="inner">
<div class="physical box"></div>
<div class="inner">
<div class="logical box"></div>
</div>
</div>
</section>
<textarea class="playable playable-css" style="height: 240px;">
.inner {
writing-mode: horizontal-tb;
}
.physical {
position: absolute;
top: 20px;
right: 0;
}
.logical {
position: absolute;
inset-block-start: 20px;
inset-inline-end: 0;
}</textarea>
<textarea class="playable playable-html" style="height: 180px;">
<div class="container">
<div class="inner">
<div class="physical box"></div>
</div>
<div class="inner">
<div class="logical box"></div>
</div>
</div>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
</body>
<script src="../css-cookbook/playable.js"></script>
</html>