Skip to content

Commit b84c4ad

Browse files
committed
Visually compressing the Cheatsheet.
Signed-off-by: Grant Skinner <[email protected]>
1 parent 06c3062 commit b84c4ad

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ <h1 class="substitution-title">Substitution</h1>
182182

183183
<tr><th colspan="2" onclick="regexr.libView.show('groups')">Groups & Lookaround</th></tr>
184184
<tr><td>(abc)</td><td>capture group</td></tr>
185-
<tr><td>\1</td><td>backreference</td></tr>
185+
<tr><td>\1</td><td>backreference to group 1</td></tr>
186186
<tr><td>(?:abc)</td><td>non-capturing group</td></tr>
187187
<tr><td>(?=abc)</td><td>positive lookahead</td></tr>
188188
<tr><td>(?!abc)</td><td>negative lookahead</td></tr>

js/documentation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ var library = {
6767

6868
{
6969
label: "Reference",
70+
id: "reference",
7071
icon: "&#xE072;",
7172
desc: "Information on all of the tokens available to create regular expressions."
7273
+"<p>Click a selected item again to insert it into your Expression.</p>"

scss/views/libView.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,25 @@ table.cheatsheet {
147147
th {
148148
@extend %user-select-none;
149149
cursor: pointer;
150-
background: rgba(255,255,255,0.05);
150+
background: rgba(255,255,255,0.06);
151151
text-align: left;
152-
padding: 0.25rem 0.25rem 0.25rem 0.5rem;
152+
padding: 0.2rem 0 0.2rem 0.375rem;
153153

154154
&:hover {
155155
color:$white;
156156
}
157157
}
158158

159+
td {
160+
line-height: 1em;
161+
padding: 1px 0 3px 0;
162+
border-bottom: 1px solid rgba(255,255,255,0.04);
163+
}
164+
159165
td:first-child {
160166
font-family: $monospace;
161167
color: $white;
162168
padding-right: 0.25em;
169+
font-size: 0.9375em;
163170
}
164171
}

0 commit comments

Comments
 (0)