From ae517065da8e530f3964b0cbf4ecf90c2c71b948 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sun, 07 Jul 2019 20:20:32 +0000
Subject: [PATCH] Improve close/hide icons usage
---
map.js | 4 ++--
map.css | 28 +++++++++++++++-------------
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/map.css b/map.css
index db4693f..aa9b4de 100644
--- a/map.css
+++ b/map.css
@@ -17,6 +17,19 @@
right: auto;
}
+.close, .hide {
+ float: right;
+ cursor: pointer;
+ font-size: 1.5em;
+ padding-left: 1em;
+ color: black;
+}
+#fail .close {
+ font-size: inherit;
+ height: 1em;
+ color: black;
+}
+
.panel {
opacity: .85;
color: black;
@@ -37,9 +50,9 @@
.panel.expanded {
right: 0;
}
-
.panel .hide {
display: none;
+ padding: 0px 1em;
}
.panel.enabled .hide {
display: block;
@@ -76,17 +89,6 @@
right: 80%;
margin-right: 10px;
}
-}
-
-.close, .hide {
- float: right;
- cursor: pointer;
- font-size: 20px;
- padding: 0px 10px;
-}
-#fail .close {
- font-size: inherit;
- height: 1em;
}
.panel .type {
padding-bottom: 0;
@@ -220,7 +222,7 @@
display: none;
}
-a {
+a, .close:hover, .hide:hover {
color: #337ab7;
text-decoration: none;
cursor: pointer;
diff --git a/map.js b/map.js
index 979cdd9..6f628c9 100644
--- a/map.js
+++ b/map.js
@@ -82,12 +82,12 @@
this._element = element;
this._element.classList.add('panel');
- this._hide = addParaWithText(this._element, '▶');
+ this._hide = addElementWithText(this._element, 'a', '▶');
this._hide.title = lang.action_collapse;
this._hide.className = 'hide';
this._hide.addEventListener('click', this.toggleExpanded.bind(this));
- this._close = addParaWithText(this._element, '×');
+ this._close = addElementWithText(this._element, 'a', '×');
this._close.title = lang.action_close;
this._close.className = 'close';
this._close.addEventListener('click', this.close.bind(this));
--
Gitblit v1.9.1