Skip to content

Commit 6931978

Browse files
feat(index.html, style.css): created tool tip (#254)
* created toolTip, to describe the action each element in the sidebar carry out * feat(index.html, style.css): created tool tip(#248) * disble tooltip for mobile * feat: add tooltip text Co-authored-by: Dunsin <[email protected]>
1 parent ee26315 commit 6931978

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ <h1 id="head">Code Magic</h1>
9797
height="20"
9898
></iconify-icon>
9999
<span>Pic-Text</span>
100+
<span class="tooltip">
101+
Convert Your Image to Character Art
102+
</span>
100103
</li>
101104
<li data-gen="gradient-text">
102105
<iconify-icon
@@ -107,6 +110,7 @@ <h1 id="head">Code Magic</h1>
107110
height="20"
108111
></iconify-icon>
109112
<span>Gradient Text</span>
113+
<span class="tooltip">Create Gradient Texts</span>
110114
</li>
111115
<li data-gen="gradient-border">
112116
<iconify-icon
@@ -117,6 +121,7 @@ <h1 id="head">Code Magic</h1>
117121
height="20"
118122
></iconify-icon>
119123
<span>Gradient Border</span>
124+
<span class="tooltip">Create Gradient border for your elements</span>
120125
</li>
121126
<li data-gen="gradient-background">
122127
<iconify-icon
@@ -127,6 +132,7 @@ <h1 id="head">Code Magic</h1>
127132
height="20"
128133
></iconify-icon>
129134
<span>Gradient Background</span>
135+
<span class="tooltip">Create Gradient Background for your websites</span>
130136
</li>
131137
<li data-gen="animation">
132138
<iconify-icon
@@ -137,6 +143,7 @@ <h1 id="head">Code Magic</h1>
137143
height="20"
138144
></iconify-icon>
139145
<span>Animator</span>
146+
<span class="tooltip">Create animations like Fade, Flip, Skew </span>
140147
</li>
141148
<li data-gen="border-radius">
142149
<iconify-icon
@@ -157,6 +164,7 @@ <h1 id="head">Code Magic</h1>
157164
height="20"
158165
></iconify-icon>
159166
<span>Box Shadow</span>
167+
<span class="tooltip">Create Box Shadow for your elements</span>
160168
</li>
161169
</ul>
162170
<footer>

src/style.css

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ nav {
5151
padding: 0 1.5rem;
5252
min-width: 15vw;
5353
height: 100vh;
54-
overflow: hidden;
5554
background-color: var(--primary-color);
5655
z-index: 99;
5756
}
@@ -97,6 +96,32 @@ nav ul > li span {
9796
margin-left: 0.2rem;
9897
}
9998

99+
nav ul > li span.tooltip{
100+
position: absolute;
101+
right:-140px;
102+
padding: 5px;
103+
width:145px;
104+
color: var(--input-color);
105+
background-color: var(--text-color);
106+
border-radius: 5px;
107+
display: none;
108+
}
109+
110+
nav ul > li .tooltip::before{
111+
content: "";
112+
position: absolute;
113+
top: 50%;
114+
left: -8%;
115+
margin-top: -5px;
116+
border-width: 6px;
117+
border-style: solid;
118+
border-color: transparent var(--text-color) transparent transparent ;
119+
}
120+
121+
nav ul > li:hover .tooltip{
122+
display: block;
123+
}
124+
100125
nav ul > li:hover {
101126
background: linear-gradient(
102127
80deg,
@@ -602,6 +627,10 @@ a {
602627
--modal-width: calc(var(--modal-container-width) - 10vw);
603628
}
604629

630+
nav ul > li:hover .tooltip{
631+
display: none;
632+
}
633+
605634
.generator {
606635
margin: 0.8rem auto;
607636
}

0 commit comments

Comments
 (0)