Skip to content

Commit

Permalink
#85 remove tooltips from #23
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMit committed Jan 6, 2020
1 parent 03ab792 commit 5adcb94
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 214 deletions.
7 changes: 0 additions & 7 deletions assets/scripts/tooltip.js

This file was deleted.

206 changes: 0 additions & 206 deletions assets/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ aside.toc {

main.content {
position: relative;
overflow-x: hidden;
}


Expand Down Expand Up @@ -1440,211 +1439,6 @@ aside::-webkit-scrollbar {
}


/**
* Tooltip Styles
*/


/* Base styles for the element that has a tooltip */

.tooltip {
position: relative;
cursor: pointer;
}


/* Base styles for the entire tooltip */

.tooltip:before,
.tooltip:after {
position: absolute;
visibility: hidden;
opacity: 0;
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
pointer-events: none;
}


/* Show the entire tooltip on hover and focus */

.tooltip:hover:before,
.tooltip:hover:after,
.tooltip:focus:before,
.tooltip:focus:after {
visibility: visible;
opacity: 1;
}


/* Base styles for the tooltip's directional arrow */

.tooltip:before {
z-index: 1001;
border: 6px solid transparent;
background: transparent;
content: "";
}


/* Base styles for the tooltip's content area */

.tooltip:after {
z-index: 1000;
padding: 8px;
width: 160px;
background-color: #000;
background-color: hsla(0, 0%, 20%, 0.9);
color: #fff;
content: attr(data-tooltip);
font-size: 14px;
line-height: 1.2;
}


/* Directions */


/* Top (default) */

.tooltip:before,
.tooltip:after,
.tooltip-top:before,
.tooltip-top:after {
bottom: 100%;
left: 50%;
}

.tooltip:before,
.tooltip-top:before {
margin-left: -6px;
margin-bottom: -12px;
border-top-color: #000;
border-top-color: hsla(0, 0%, 20%, 0.9);
}


/* Horizontally align top/bottom tooltips */

.tooltip:after,
.tooltip-top:after {
margin-left: -80px;
}

.tooltip:hover:before,
.tooltip:hover:after,
.tooltip:focus:before,
.tooltip:focus:after,
.tooltip-top:hover:before,
.tooltip-top:hover:after,
.tooltip-top:focus:before,
.tooltip-top:focus:after {
-webkit-transform: translateY(-12px);
-moz-transform: translateY(-12px);
transform: translateY(-12px);
}


/* Left */

.tooltip-left:before,
.tooltip-left:after {
right: 100%;
bottom: 50%;
left: auto;
}

.tooltip-left:before {
margin-left: 0;
margin-right: -12px;
margin-bottom: 0;
border-top-color: transparent;
border-left-color: #000;
border-left-color: hsla(0, 0%, 20%, 0.9);
}

.tooltip-left:hover:before,
.tooltip-left:hover:after,
.tooltip-left:focus:before,
.tooltip-left:focus:after {
-webkit-transform: translateX(-12px);
-moz-transform: translateX(-12px);
transform: translateX(-12px);
}


/* Bottom */

.tooltip-bottom:before,
.tooltip-bottom:after {
top: 100%;
bottom: auto;
left: 50%;
}

.tooltip-bottom:before {
margin-top: -12px;
margin-bottom: 0;
border-top-color: transparent;
border-bottom-color: #000;
border-bottom-color: hsla(0, 0%, 20%, 0.9);
}

.tooltip-bottom:hover:before,
.tooltip-bottom:hover:after,
.tooltip-bottom:focus:before,
.tooltip-bottom:focus:after {
-webkit-transform: translateY(12px);
-moz-transform: translateY(12px);
transform: translateY(12px);
}


/* Right */

.tooltip-right:before,
.tooltip-right:after {
bottom: 50%;
left: 100%;
}

.tooltip-right:before {
margin-bottom: 0;
margin-left: -12px;
border-top-color: transparent;
border-right-color: #000;
border-right-color: hsla(0, 0%, 20%, 0.9);
}

.tooltip-right:hover:before,
.tooltip-right:hover:after,
.tooltip-right:focus:before,
.tooltip-right:focus:after {
-webkit-transform: translateX(12px);
-moz-transform: translateX(12px);
transform: translateX(12px);
}


/* Move directional arrows down a bit for left/right tooltips */

.tooltip-left:before,
.tooltip-right:before {
top: 3px;
}


/* Vertically center tooltip content for left/right tooltips */

.tooltip-left:after,
.tooltip-right:after {
margin-left: 0;
margin-bottom: -16px;
}


/* copy snippet */

.hljs-container.hljs {
Expand Down
1 change: 0 additions & 1 deletion pages/meta/bundle-scripts.js.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ permalink: "assets/scripts/bundle.js"
{% include "assets/scripts/register-service-worker.js" %}
{% include "assets/scripts/offline.js" %}
{% include "assets/scripts/copy-snippet.js" %}
{% include "assets/scripts/tooltip.js" %}
{% include "assets/scripts/site.js" %}
{% endset %}

Expand Down

0 comments on commit 5adcb94

Please sign in to comment.