Skip to content

Diagram css fix #12911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scaladoc/resources/dotty_res/scripts/ux.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ window.addEventListener("DOMContentLoaded", () => {
$(this).parent().toggleClass("expanded")
});

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

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

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

Expand Down
3 changes: 3 additions & 0 deletions scaladoc/resources/dotty_res/styles/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
--red800: hsl(1 , 72% , 24%);
--red900: hsl(1 , 75% , 12%);

/* Diagram central node aureole */

--aureole: hsl(40, 100%, 75%);

/* Light Mode */
--border-light: var(--grey200);
Expand Down
20 changes: 10 additions & 10 deletions scaladoc/resources/dotty_res/styles/diagram.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
.node {
stroke: #333;
stroke: var(--inactive-bg);
stroke-width: 2.5px;
fill: white;
fill: var(--inactive-bg);
}

.edgeLabel {
fill: white;
fill: var(--inactive-fg);
}

.edgePath {
stroke: #333;
stroke: var(--inactive-fg);
stroke-width: 1.5px;
fill: #333;
fill: var(--inactive-fg);
}

#graph {
Expand Down Expand Up @@ -44,16 +44,16 @@
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
background-color: white;
color: black;
border: 2px solid #003048;
background-color: var(--body-bg);
color: var(--body-fg);
border: 2px solid var(--body-fg);
position: absolute;
top: 0;
left: 0;
z-index:2;
}

.btn:hover {
background-color: #003048;
color: white;
background-color: var(--active-bg);
color: var(--active-fg);
}