Skip to content

Commit 3939f6e

Browse files
committed
fix(toolbar): Center icons in the toolbar buttons
Only `a.cesium-toolbar-button` was flex-centered, so the `<button>` variants let their icons drift: Nuxt UI renders icons as block-level SVGs that hug the button's left edge, and the custom background icons leaned on manual margin nudges. Flex-center every app toolbar button (scoped to #toolbarLeft / #toolbarRight so Cesium's own buttons stay untouched) and drop the now-redundant margin hacks. All toolbar icons now sit dead-centered. Assisted-by: ClaudeCode:claude-opus-4-8
1 parent 44fdab5 commit 3939f6e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/css/main.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ input:checked + .slider::before {
100100
color: #ffffff;
101101
}
102102

103-
a.cesium-toolbar-button {
103+
/* Center the icon (custom <i> background icons or Nuxt UI <svg>) in every
104+
app toolbar button. Applies to both <a> and <button>; without flex the
105+
block-level Iconify SVGs hug the button's left edge. */
106+
#toolbarLeft .cesium-toolbar-button,
107+
#toolbarRight .cesium-toolbar-button {
104108
align-items: center;
105109
justify-content: center;
106110
display: inline-flex;
@@ -117,12 +121,9 @@ a.cesium-toolbar-button {
117121
background: url("../images/icons/sat/2.svg") no-repeat;
118122
filter: brightness(3.1);
119123
transform: rotate(-90deg);
120-
margin-bottom: 2px;
121124
}
122125

123126
.svg-groundstation {
124127
background: url("../images/icons/sat/9.svg") no-repeat;
125128
filter: brightness(3.1);
126-
margin-bottom: 2px;
127-
margin-left: 2px;
128129
}

0 commit comments

Comments
 (0)