Skip to content

Commit dc9f5a3

Browse files
committed
Diagram css fix
1 parent 51f3487 commit dc9f5a3

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

scaladoc/resources/dotty_res/scripts/ux.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ window.addEventListener("DOMContentLoaded", () => {
2020
$(this).parent().toggleClass("expanded")
2121
});
2222

23-
$('.names .tab').on('click', function(){
23+
$('.names .tab').on('click', function() {
2424
parent = $(this).parents(".tabs").first()
2525
shown = $(this).hasClass('selected')
2626
single = parent.hasClass("single")
@@ -32,7 +32,7 @@ window.addEventListener("DOMContentLoaded", () => {
3232
if (!shown) { myTab.addClass('selected') }
3333
if (shown && !single) myTab.removeClass('selected')
3434

35-
if(!shown && $(this).find(".showGraph")){
35+
if(!shown && $(this).filter(".showGraph").length > 0) {
3636
showGraph()
3737
$(this).find(".showGraph").removeClass("showGraph")
3838
}
@@ -84,8 +84,8 @@ function showGraph() {
8484
if (dotNode){
8585
var svg = d3.select("#graph");
8686
var radialGradient = svg.append("defs").append("radialGradient").attr("id", "Gradient");
87-
radialGradient.append("stop").attr("stop-color", "#ffd47f").attr("offset", "20%");
88-
radialGradient.append("stop").attr("stop-color", "white").attr("offset", "100%");
87+
radialGradient.append("stop").attr("stop-color", "var(--aureole)").attr("offset", "20%");
88+
radialGradient.append("stop").attr("stop-color", "var(--code-bg)").attr("offset", "100%");
8989

9090
var inner = svg.append("g");
9191

scaladoc/resources/dotty_res/styles/colors.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
--red800: hsl(1 , 72% , 24%);
3939
--red900: hsl(1 , 75% , 12%);
4040

41+
/* Diagram central node aureole */
42+
43+
--aureole: hsl(40, 100%, 75%);
4144

4245
/* Light Mode */
4346
--border-light: var(--grey200);

scaladoc/resources/dotty_res/styles/diagram.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
.node {
2-
stroke: #333;
2+
stroke: var(--inactive-bg);
33
stroke-width: 2.5px;
4-
fill: white;
4+
fill: var(--inactive-bg);
55
}
66

77
.edgeLabel {
8-
fill: white;
8+
fill: var(--inactive-fg);
99
}
1010

1111
.edgePath {
12-
stroke: #333;
12+
stroke: var(--inactive-fg);
1313
stroke-width: 1.5px;
14-
fill: #333;
14+
fill: var(--inactive-fg);
1515
}
1616

1717
#graph {
@@ -44,16 +44,16 @@
4444
margin: 4px 2px;
4545
transition-duration: 0.4s;
4646
cursor: pointer;
47-
background-color: white;
48-
color: black;
49-
border: 2px solid #003048;
47+
background-color: var(--body-bg);
48+
color: var(--body-fg);
49+
border: 2px solid var(--body-fg);
5050
position: absolute;
5151
top: 0;
5252
left: 0;
5353
z-index:2;
5454
}
5555

5656
.btn:hover {
57-
background-color: #003048;
58-
color: white;
57+
background-color: var(--active-bg);
58+
color: var(--active-fg);
5959
}

0 commit comments

Comments
 (0)