Skip to content
Open
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
2 changes: 1 addition & 1 deletion assets/js/accessibility-new-window-warnings-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/accessibility-new-window-warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
pointerEvents: "auto",
boxShadow: "0px 4px 6px rgba(0,0,0,0.1)",
maxWidth: "200px",
whiteSpace: "nowrap"
whiteSpace: "normal",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change correctly enables text wrapping, you could improve maintainability by moving all static tooltip styles to your CSS file. This separates presentation (CSS) from behavior (JS).

For example, you could add the following to assets/css/accessibility-new-window-warnings.css:

.anww-tooltip {
  position: absolute;
  background: white;
  color: #1e1e1e;
  font-size: 16px;
  border: 1px solid black;
  padding: 5px 10px;
  z-index: 9999;
  display: none;
  pointer-events: auto;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
  max-width: 200px;
  white-space: normal;
}

Then, the initializeTooltip function in this file could be simplified by removing the Object.assign call that sets these styles inline. This is an optional suggestion for future improvement.

});
document.body.appendChild(anwwLinkTooltip);

Expand Down
Loading