Skip to content

Commit

Permalink
Title -> Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih-erikli committed Sep 4, 2023
1 parent 7072e8a commit 941898c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/fontra/client/css/tooltip.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[data-title] {
[data-tooltip] {
position: relative;
cursor: default;
}

[data-title]:hover::before {
content: attr(data-title);
[data-tooltip]:hover::before {
content: attr(data-tooltip);
font-size: 10px;
text-align: center;
position: absolute;
Expand All @@ -25,7 +25,7 @@
animation-duration: 6s;
}

[data-title]:hover::after {
[data-tooltip]:hover::after {
content: "";
position: absolute;
display: block;
Expand Down Expand Up @@ -60,11 +60,11 @@
}

@media (prefers-reduced-motion) {
[data-title]:hover::before {
[data-tooltip]:hover::before {
opacity: 1;
animation: none;
}
[data-title]:hover::after {
[data-tooltip]:hover::after {
opacity: 1;
animation: none;
}
Expand Down
4 changes: 2 additions & 2 deletions src/fontra/client/web-components/icon-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class IconButton extends UnlitElement {

static properties = {
src: { type: String },
title: { type: String },
tooltip: { type: String },
};

get disabled() {
Expand All @@ -64,7 +64,7 @@ export class IconButton extends UnlitElement {
{
"onclick": this._buttonOnClick,
"disabled": this._buttonDisabled,
"data-title": this.title,
"data-tooltip": this.tooltip,
},
[html.createDomElement("inline-svg", { src: this.src })]
);
Expand Down
4 changes: 2 additions & 2 deletions src/fontra/views/editor/panel-designspace-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ export default class DesignspaceNavigationPanel extends Panel {
onclick: (event) => this.resetAllAxesToDefault(event),
disabled: false,
hidden: true,
title: "Reset all axes",
tooltip: "Reset all axes",
}),
html.createDomElement("icon-button", {
id: "edit-local-axes-button",
src: "/tabler-icons/tool.svg",
onclick: (event) => this.editLocalAxes(event),
title: "Edit local axes",
tooltip: "Edit local axes",
}),
]),
html.hr(),
Expand Down

0 comments on commit 941898c

Please sign in to comment.