Skip to content

Commit 4171a44

Browse files
committed
deploy: c249eba
1 parent b00ca0c commit 4171a44

File tree

5 files changed

+55
-11
lines changed

5 files changed

+55
-11
lines changed

user/ayu-highlight.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Original by Dempfi (https://github.com/dempfi/ayu)
88
overflow-x: auto;
99
background: #191f26;
1010
color: #e6e1cf;
11-
padding: 0.5em;
1211
}
1312

1413
.hljs-comment,

user/css/chrome.css

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,63 @@ pre {
208208
pre > .buttons {
209209
position: absolute;
210210
z-index: 100;
211-
right: 5px;
212-
top: 5px;
211+
right: 0px;
212+
top: 2px;
213+
margin: 0px;
214+
padding: 2px 0px;
213215

214216
color: var(--sidebar-fg);
215217
cursor: pointer;
218+
visibility: hidden;
219+
opacity: 0;
220+
transition: visibility 0.1s linear, opacity 0.1s linear;
221+
}
222+
pre:hover > .buttons {
223+
visibility: visible;
224+
opacity: 1
216225
}
217226
pre > .buttons :hover {
218227
color: var(--sidebar-active);
228+
border-color: var(--icons-hover);
229+
background-color: var(--theme-hover);
219230
}
220231
pre > .buttons i {
221232
margin-left: 8px;
222233
}
223234
pre > .buttons button {
224-
color: inherit;
225-
background: transparent;
226-
border: none;
227235
cursor: inherit;
236+
margin: 0px 5px;
237+
padding: 3px 5px;
238+
font-size: 14px;
239+
240+
border-style: solid;
241+
border-width: 1px;
242+
border-radius: 4px;
243+
border-color: var(--icons);
244+
background-color: var(--theme-popup-bg);
245+
transition: 100ms;
246+
transition-property: color,border-color,background-color;
247+
color: var(--icons);
228248
}
249+
@media (pointer: coarse) {
250+
pre > .buttons button {
251+
/* On mobile, make it easier to tap buttons. */
252+
padding: 0.3rem 1rem;
253+
}
254+
}
255+
code {
256+
padding: 1rem;
257+
}
258+
259+
/* FIXME: ACE editors overlap their buttons because ACE does absolute
260+
positioning within the code block which breaks padding. The only solution I
261+
can think of is to move the padding to the outer pre tag (or insert a div
262+
wrapper), but that would require fixing a whole bunch of CSS rules.
263+
*/
264+
.hljs.ace_editor {
265+
padding: 0rem 0rem;
266+
}
267+
229268
pre > .result {
230269
margin-top: 10px;
231270
}

user/css/general.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ code {
2626
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
2727
}
2828

29+
/* make long words/inline code not x overflow */
30+
main {
31+
overflow-wrap: break-word;
32+
}
33+
34+
/* make wide tables scroll if they overflow */
35+
.table-wrapper {
36+
overflow-x: auto;
37+
}
38+
2939
/* Don't change font size in headers. */
3040
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
3141
font-size: unset;
@@ -80,8 +90,7 @@ h6:target::before {
8090

8191
.content {
8292
overflow-y: auto;
83-
padding: 0 15px;
84-
padding-bottom: 50px;
93+
padding: 0 5px 50px 5px;
8594
}
8695
.content main {
8796
margin-left: auto;

user/highlight.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
overflow-x: auto;
6262
background: #f6f7f6;
6363
color: #000;
64-
padding: 0.5em;
6564
}
6665

6766
.hljs-emphasis {

user/tomorrow-night.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
overflow-x: auto;
8282
background: #1d1f21;
8383
color: #c5c8c6;
84-
padding: 0.5em;
85-
-webkit-text-size-adjust: none;
8684
}
8785

8886
.coffeescript .javascript,

0 commit comments

Comments
 (0)