Commit 31c1e76
authored
Simplify
In the first three `calc()` expressions, `100vw` is less than `1280px`
(otherwise we'd be in the `screen(xl)` media query), so `min(1280px,
100vw)` is just a complex way to say `100vw`, and thus `calc((100vw -
(min(1280px, 100vw) - 32px)) / 2 * -1)` is just a very complex way to
say `-16px`. I simplified them to the corresponding `-mx-` classes, so
that it's clear that they are the same numbers used in
`.section-x-inset-xl`.
In the last `calc()`, `100vw` is always more than `1280px` (because of
the media query), so `min(1280px, 100vw)` is just a complex way of
saying `1280px`. I left `1280px - 112px` which is hopefully more clear
than just writing `1068px`.
Note that using `100vw` instead of `1280px` in the last one would fix
the bug reported in #944, but I'm
assuming that `min(1280px, 100vw)` is there for a reason so I cannot
simply remove it.
---
**Edit**: The second commit fixes #944, by using the page width
_excluding the vertical scrollbar_ rather than using the full page width
to compute the sticky breadcrumb margin..-section-x-inset-xl CSS (#945)1 parent c3f659a commit 31c1e76
2 files changed
+5
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | 155 | | |
162 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
| |||
0 commit comments