Skip to content

Commit

Permalink
refactor: move tooltip style in css file
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Mar 8, 2024
1 parent 484f580 commit 5b2935f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ window.addEventListener('resize', resizeMap);

const tooltip = d3.select('body').append('div')
.attr('class', 'tooltip')
.style('position', 'absolute')
.style('background-color', 'white')
.style('border', '1px solid black')
.style('padding', '5px')
.style('border-radius', '5px')
.style('visibility', 'hidden');

const addedStations = new Map();
const g = svg.append("g");
Expand Down
10 changes: 10 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ svg {

.end {
color: #e52228;
}

.tooltip {
position: absolute;
visibility: hidden;
padding: 0.5rem;
background-color: #fff;
border: 1px solid #000;
border-radius: 0.25rem;
color: #3b3d45;
}

0 comments on commit 5b2935f

Please sign in to comment.