Skip to content

Commit

Permalink
apply axe-hack to sorting.html, issue #449
Browse files Browse the repository at this point in the history
Because the issue only seems to happen when a display:inline
element is a child of a display:block element and overflows
(in addition to some other conditions), our hack just sets
code elems which are children of pre elems to display:block.
  • Loading branch information
travisdowns committed Sep 26, 2021
1 parent 7048940 commit 6822752
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _posts/2019-05-22-sorting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image: /assets/2019-05-22/og-image.jpg
assets: /assets/2019-05-22
code: https://github.com/travisdowns/sort-bench/blob/master
excerpt: Building sort functions faster than what the C and C++ standard libraries offer.
content_classes: invert-img
content_classes: invert-img axe-hack
---

Recently, Daniel Lemire [tackled the topic](https://lemire.me/blog/2019/05/07/almost-picking-n-distinct-numbers-at-random/) of selecting N _distinct_ numbers at random. In the case we want sorted output, an obvious solution presents itself: sorting randomly chosen values and de-duplicating the list, which is easy since identical values are now adjacent.[^distinct]
Expand Down
7 changes: 6 additions & 1 deletion _sass/minima/custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,14 @@ sup[id^='fnref'] {
border-radius:10%;
}

// work around
// workaround for
// https://github.com/jekyll/minima/issues/604
pre,
code {
@include relative-font-size(0.9375);
}

// workaround for https://github.com/travisdowns/travisdowns.github.io/issues/449
.axe-hack pre > code {
display: block;
}

0 comments on commit 6822752

Please sign in to comment.