Skip to content
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

incorporate tooltips #1

Open
sgbaird opened this issue May 29, 2022 · 1 comment
Open

incorporate tooltips #1

sgbaird opened this issue May 29, 2022 · 1 comment

Comments

@sgbaird
Copy link
Owner

sgbaird commented May 29, 2022

usage:

<div class="tooltip">Example tooltip
  <span class="tooltiptext">Tooltip text</span>
</div>

style (placed at bottom of .md file):

<style>
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 150%;
  left: 50%;
  margin-left: -60px;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}
</style>
@sgbaird
Copy link
Owner Author

sgbaird commented May 29, 2022

<span> tag seems to be more compatible with hyperlinks directly after

<span class="tooltip" markdown="1"> until just before midnight
  <span class="tooltiptext">I don't work on Sundays as part of my
personal efforts to keep the Sabbath day holy.</span>
</span><sup>[1][sabbath-day]</sup>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant