Skip to content

Commit

Permalink
Split tooltip CSS into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Feb 4, 2024
1 parent 7c28872 commit 4d1a878
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
25 changes: 0 additions & 25 deletions js/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ li#status-container {
overflow: hidden;
}

.hidden {
display: none !important;
}

/* Clipboard */
#clipboard-content {
display: flex;
Expand All @@ -99,24 +95,3 @@ li#status-container {
min-width: 500px;
max-width: 100%;
}

.tooltip-container {
overflow: visible; /* Needed for the arrow to show up */
width: max-content;
position: absolute;
top: 0;
left: 0;
background: white;
color: var(--jupyter-dark-grey);
padding: 6px;
border-radius: 4px;
font-size: 90%;
}

.arrow {
position: absolute;
background: white;
width: 8px;
height: 8px;
transform: rotate(45deg);
}
2 changes: 1 addition & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "./index.css";
// RFB holds the API to connect and communicate with a VNC server
import RFB from "@novnc/novnc/core/rfb";

import { setupTooltip } from "./tooltip";
import { setupTooltip } from "./tooltip.js";

// When this function is called we have successfully connected to a server
function connectedToServer() {
Expand Down
24 changes: 24 additions & 0 deletions js/tooltip.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.hidden {
display: none !important;
}

.tooltip-container {
overflow: visible; /* Needed for the arrow to show up */
width: max-content;
position: absolute;
top: 0;
left: 0;
background: white;
color: var(--jupyter-dark-grey);
padding: 6px;
border-radius: 4px;
font-size: 90%;
}

.arrow {
position: absolute;
background: white;
width: 8px;
height: 8px;
transform: rotate(45deg);
}
1 change: 1 addition & 0 deletions js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Mostly follows https://floating-ui.com/docs/tutorial
*/
import { computePosition, flip, shift, offset, arrow } from "@floating-ui/dom";
import "./tooltip.css";

/**
* Setup trigger element to toggle showing / hiding tooltip element
Expand Down

0 comments on commit 4d1a878

Please sign in to comment.