Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit ded6a51

Browse files
committed
Rotate threat model headers 45 degrees instead of 90.
1 parent 69e2b43 commit ded6a51

File tree

2 files changed

+38
-12
lines changed

2 files changed

+38
-12
lines changed

index.bs

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,41 @@ spec: PSL; urlPrefix: https://publicsuffix.org/
4242
<pre class='link-defaults'>
4343
</pre>
4444
<style>
45-
.threatmodel tr.goals th {
46-
padding: 1ex;
47-
max-height: 20em;
48-
}
49-
.threatmodel tr.goals th * {
50-
writing-mode: vertical-rl;
45+
@supports(transform: rotate(45deg)) {
46+
/* Rotate threat model table headers to fit more columns on the screen.
47+
* Details adapted from
48+
* https://wabain.github.io/2019/10/13/css-rotated-table-header.html */
49+
.threatmodel tr.goals th {
50+
/* sin(45deg) == 0.707 */
51+
height: calc((25em + 3em) * 0.707);
52+
vertical-align: bottom;
53+
text-align: right;
54+
line-height: 1;
55+
}
56+
.threatmodel tr.goals th > div {
57+
width: 5em;
58+
}
59+
.threatmodel tr.goals th > div > div {
60+
width: 25em;
61+
transform-origin: bottom left;
62+
/* Read the transform steps bottom-up. */
63+
transform:
64+
/* Move the bottom corner from the left edge of the column to the center. */
65+
translateX(calc(5em/2))
66+
/* Rotate 45 degrees clockwise. */
67+
rotate(45deg)
68+
/* Move the bottom-right corner to the left edge of the column, which is
69+
* the transform-origin. */
70+
translateX(-100%);
71+
}
72+
.threatmodel tr.goals th a[href] {
73+
border-bottom: 0;
74+
}
5175
}
76+
5277
.threatmodel td {
5378
text-align: center;
79+
min-width: 2em;
5480
}
5581
details[open] {
5682
position: absolute;

xsite-tracking-model.bsinc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<table class="threatmodel">
44
<tr class="goals">
55
<td></td>
6-
<th>[[#goal-transfer-userid]]</th>
7-
<th>[[#goal-userid-tracker-to-self-in-pub]]</th>
8-
<th>[[#goal-userid-tracker-in-pub1-to-self-in-pub2]]</th>
9-
<th>[[#goal-prob-transfer-userid-no-nav]]</th>
10-
<th>[[#goal-prob-transfer-userid]]</th>
6+
<th><div><div>[[#goal-transfer-userid]]</div></div></th>
7+
<th><div><div>[[#goal-userid-tracker-to-self-in-pub]]</div></div></th>
8+
<th><div><div>[[#goal-userid-tracker-in-pub1-to-self-in-pub2]]</div></div></th>
9+
<th><div><div>[[#goal-prob-transfer-userid-no-nav]]</div></div></th>
10+
<th><div><div>[[#goal-prob-transfer-userid]]</div></div></th>
1111
</tr>
1212
<tr>
1313
<th>[[#cap-iframes]]</th>
@@ -111,7 +111,7 @@ attacker-controlled javascript):
111111
<table class="threatmodel">
112112
<tr class="goals">
113113
<td></td>
114-
<th>[[#goal-prob-transfer-userid-no-nav]]</th>
114+
<th><div><div>[[#goal-prob-transfer-userid-no-nav]]</div></div></th>
115115
</tr>
116116
<tr>
117117
<th>[[#cap-type-identifier]]</th>

0 commit comments

Comments
 (0)