Skip to content

Commit

Permalink
Updates to cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Oct 19, 2022
1 parent 0a08a61 commit 787b3ad
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 12 deletions.
6 changes: 4 additions & 2 deletions Cheatsheet.cheatmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Cheatsheet User Guide

This document is a cheatsheet on how to use cheatsheets.
Cheatsheets are Markdown files with the `.cheatmd` extension.

## I'm a H2 title with 2 columns
{: .col-2}

Expand All @@ -10,7 +13,6 @@
| `.col-2` | "two-column"|
| `.col-3` | "three-column"|
| `-col-2-left` | "two-columns" (1/3 - 2/3) |
| `.table-col` | "tables will take only 50% of the page"|

Set the number of columns under the H2 titles.

Expand Down Expand Up @@ -146,7 +148,7 @@ Long lines will have scrollbars on hover.

### Line wrapping

```
```elixir
defmodule MyTracer do
def trace({:remote_function, _meta, module, name, arity}, env) do
IO.puts "#{env.file}:#{env.line} #{inspect(module)}.#{name}/#{arity}"
Expand Down
15 changes: 9 additions & 6 deletions assets/css/content/cheatsheet.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.page-cheatmd .content-inner {
max-width: 1200px;
}

/* h1 styling */

.page-cheatmd h1 {
Expand Down Expand Up @@ -55,7 +59,6 @@
.page-cheatmd h4 {
display: block;
margin: 0;
margin-bottom: -1px;
padding: 0.25em 1.5em;
font-weight: 400;
background: var(--gray100);
Expand Down Expand Up @@ -99,11 +102,6 @@
margin: 0;
}

.page-cheatmd .h2 pre code::-webkit-scrollbar {
width: 0.4rem;
height: 0.3rem;
}

.page-cheatmd pre.wrap {
white-space: break-spaces;
}
Expand Down Expand Up @@ -170,6 +168,11 @@
border-bottom: 1px solid var(--codeBorder);
}

.page-cheatmd .h2 ul + pre code,
.page-cheatmd .h2 ol + pre code {
border-top: 0;
}

.page-cheatmd .h2 li > code {
color: #eb5757;
border-radius: 3px;
Expand Down
4 changes: 0 additions & 4 deletions assets/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ body.search-focused .sidebar-search .search-close-button {
padding: 3px 60px;
}

.page-cheatmd .content-inner {
max-width: 1200px;
}

.content-inner:focus {
outline: none;
}
Expand Down
52 changes: 52 additions & 0 deletions formatters/html/dist/html-FHOK2366.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions formatters/html/dist/html-elixir-ETAE2YCT.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions formatters/html/dist/html-erlang-XWTZGLBX.css

Large diffs are not rendered by default.

0 comments on commit 787b3ad

Please sign in to comment.