Skip to content

Commit ef59d97

Browse files
committed
CSS adjustments: diff colors, snippet paddings, inline code colors
1 parent cdc905f commit ef59d97

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

scaladoc-js/common/css/code-snippets.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Snippets */
22

33
.snippet {
4-
padding: 12px 8px 10px 12px;
4+
position: relative;
55
background: var(--code-bg);
66
margin: 1em 0px;
77
border-radius: 2px;
@@ -35,6 +35,9 @@
3535

3636
.snippet .buttons {
3737
--icon-size: 16px;
38+
position: absolute;
39+
right: 0;
40+
top: 0.5em
3841
}
3942

4043
.snippet-showhide {
@@ -134,6 +137,14 @@ input:checked + .slider:before {
134137
}
135138

136139
.snippet .buttons {
140+
transition: all .2s ease;
141+
opacity: 0;
142+
visibility: hidden;
143+
}
144+
145+
.snippet:hover .buttons {
146+
opacity: 1;
147+
visibility: visible;
137148
display: flex;
138149
flex-direction: row-reverse;
139150
justify-content: flex-start;

scaladoc/resources/dotty_res/styles/nord-light.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
--hljs-keyword: hsl(213, 60%, 45%);
1212
--hljs-string: hsl(92, 46%, 43%);
1313
--hljs-literal: hsl(311, 30%, 47%);
14+
--hljs-addition: hsl(122, 40.97%, 44.51%);
15+
--hljs-deletion: hsl(1 , 66% , 64%);
1416
}
1517
:root.theme-dark {
1618
--hljs-meta: hsl(40, 100%, 49%);
@@ -65,3 +67,9 @@ pre, .hljs {
6567
.hljs-built_in, .hljs-number, .hljs-literal {
6668
color: var(--hljs-literal);
6769
}
70+
.hljs-addition {
71+
color: var(--hljs-addition);
72+
}
73+
.hljs-deletion {
74+
color: var(--hljs-deletion);
75+
}

scaladoc/resources/dotty_res/styles/scalastyle.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,18 @@ h1, h2, h3 {
6969
font-variant-ligatures: none;
7070
/* padding: 8px; */
7171
}
72-
pre, code, .hljs {
72+
pre, .hljs {
7373
font-family: var(--mono-font);
7474
background: var(--code-bg);
7575
font-variant-ligatures: none;
7676
}
7777
code {
7878
font-size: .8em;
79-
padding: 0 .3em;
79+
font-weight: 500;
80+
padding: 3px 6px;
81+
border-radius: 4px;
82+
color: var(--code-fg);
83+
background-color: var(--code-bg);
8084
}
8185
pre {
8286
overflow-x: auto;

0 commit comments

Comments
 (0)