PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.3
WP Coder – Insert & Manage Code Snippets v4.3
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / assets / scss / _tooltip.scss

_tooltip.scss in WP Coder – Insert & Manage Code Snippets 4.3, at assets/scss/_tooltip.scss

105 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 .wowp-tooltip {
2 position: relative;
3 font-weight: 400;
4 cursor: help;
5 &.is-pointer {
6 cursor: pointer;
7 }
8
9 &::before,
10 &::after {
11 color: #efefef;
12 font-size: 12px;
13 opacity: 0;
14 pointer-events: none;
15 text-align: center;
16 }
17
18 &::before {
19 position: absolute;
20 top: 0;
21 left: 50%;
22 background-color: rgba(0,0,0, 0.85);
23 border-radius: 2px;
24 color: #ffffff;
25 content: attr(data-tooltip); //This pulls in the text from the element with the tooltip
26 padding: 10px;
27 text-transform: none;
28 transition: all 0.5s ease;
29 max-width: 200px;
30 width: max-content;
31 transform: translateY(calc(-100% - 7px)) translateX(-50%);
32 word-wrap: break-word;
33 white-space: break-spaces;
34 line-height: 1.5;
35 text-align: left;
36 }
37
38 //Tooltip arrow
39 &::after {
40 position: absolute;
41 top: -7px;
42 left: 50%;
43 border-left: 5px solid transparent;
44 border-right: 5px solid transparent;
45 border-top: 5px solid var(--wowp-gray-900);
46 content: " ";
47 font-size: 0;
48 line-height: 0;
49 margin-left: -5px;
50 width: 0;
51 transform: translateX(-50%);
52 }
53
54 &:focus-visible::before,
55 &:focus-visible::after,
56 &:focus::before,
57 &:focus::after,
58 &:hover::before,
59 &:hover::after {
60 opacity: 1;
61 transition: all 0.75s ease;
62 }
63
64 &.on-right {
65 &::before{
66 top: 50%;
67 left: 100%;
68 transform: translateY(-50%) translateX(4px);
69 }
70 &::after{
71 top: 50%;
72 left: calc(100% + 2px);
73 rotate: 90deg;
74 transform: translateX(calc(-50% + 2.5px));
75 }
76 }
77
78 &.on-left {
79 &::before{
80 top: 50%;
81 left: -2px;
82 transform: translateY(-50%) translateX(-100%);
83 }
84 &::after{
85 top: 50%;
86 left: 0;
87 rotate: -90deg;
88 transform: translateX(calc(-50% + 7px));
89 }
90 }
91
92 &.on-bottom {
93 &::before{
94 top: unset;
95 bottom: 0;
96 transform: translateY(calc(100% + 7px)) translateX(-50%);
97 }
98 &::after{
99 top: unset;
100 bottom: -7px;
101 rotate: 180deg;
102 }
103 }
104
105 }