mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Extract out menu icon CSS, refs #981
This commit is contained in:
parent
64127a4593
commit
141544613f
2 changed files with 8 additions and 4 deletions
|
|
@ -388,6 +388,13 @@ button.button-as-link {
|
|||
font-size: 1em;
|
||||
}
|
||||
|
||||
svg.dropdown-menu-icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
cursor: pointer;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.dropdown-menu {
|
||||
display: inline-flex;
|
||||
border: 1px solid #ccc;
|
||||
|
|
|
|||
|
|
@ -117,9 +117,7 @@ var DROPDOWN_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="14" heig
|
|||
var svg = document.createElement('div');
|
||||
svg.innerHTML = DROPDOWN_ICON_SVG;
|
||||
svg = svg.querySelector('*');
|
||||
svg.style.display = 'inline-block';
|
||||
svg.style.position = 'relative';
|
||||
svg.style.top = '1px';
|
||||
svg.classList.add('dropdown-menu-icon');
|
||||
var menu = document.createElement('div');
|
||||
menu.innerHTML = DROPDOWN_HTML;
|
||||
menu = menu.querySelector('*');
|
||||
|
|
@ -134,7 +132,6 @@ var DROPDOWN_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="14" heig
|
|||
}
|
||||
var icon = svg.cloneNode(true);
|
||||
icon.addEventListener('click', iconClicked);
|
||||
icon.style.cursor = 'pointer';
|
||||
th.appendChild(icon);
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue