Skip to content

Commit b7c0fd2

Browse files
committed
feat: use FontAwesome arrow icons for back/forward nav buttons
Replace the sprite-icon `leftArrow` / `rightArrow` / `leftArrowDisabled` / `rightArrowDisabled` bitmaps with fa-arrow-left / fa-arrow-right FA icons, matching the weight of the adjacent FA-based sidebar and toolbar buttons (binoculars, search, design-mode toggle) and giving the back/forward pair a browser-style affordance. NavigationProvider still toggles `.nav-back-btn` ↔ `.nav-back-btn-disabled` (and the forward pair) to signal enabled state. The CSS is rewritten as a single icon-button block with a .disabled opacity fork instead of four separate sprite rules.
1 parent 97ac670 commit b7c0fd2

2 files changed

Lines changed: 27 additions & 30 deletions

File tree

src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,8 @@
914914
<a id="phcode-io-main-nav" href="https://phcode.io" target="_blank" rel="noopener">phcode.io</a>
915915
</div>
916916
<div id="mainNavBarRight">
917-
<div id="navBackButton" class="nav-back-btn btn-alt-quiet"></div>
918-
<div id="navForwardButton" class="nav-forward-btn btn-alt-quiet"></div>
917+
<div id="navBackButton" class="nav-back-btn btn-alt-quiet"><i class="fa-solid fa-arrow-left"></i></div>
918+
<div id="navForwardButton" class="nav-forward-btn btn-alt-quiet"><i class="fa-solid fa-arrow-right"></i></div>
919919
<div id="showInfileTree" class="show-in-file-tree-btn btn-alt-quiet"></div>
920920
<div id="searchNav" class="search-nav-btn btn-alt-quiet"></div>
921921
<div class="working-set-splitview-btn btn-alt-quiet"></div>

src/styles/brackets.less

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,44 +1295,41 @@ a, img {
12951295
z-index: 1;
12961296
}
12971297

1298-
.nav-back-btn {
1298+
/* Back / forward nav buttons use FontAwesome arrows so they match the
1299+
browser's back/forward affordance and stay visually consistent with
1300+
the other FA-based sidebar and toolbar buttons. NavigationProvider
1301+
still toggles .nav-back-btn / .nav-back-btn-disabled (and the forward
1302+
pair) to signal the enabled state — the rules below read as a single
1303+
icon button with an enabled/disabled fork. */
1304+
.nav-back-btn,
1305+
.nav-forward-btn,
1306+
.nav-back-btn-disabled,
1307+
.nav-forward-btn-disabled {
12991308
top: 7px;
13001309
padding: 4px 6px;
1301-
.sprite-icon(0, 0, 13px, 13px, "images/sprites.svg#leftArrow");
1302-
background-position: center;
1303-
background-size: cover;
1304-
opacity: 0.8;
1310+
width: 13px;
1311+
height: 13px;
1312+
display: inline-flex;
1313+
align-items: center;
1314+
justify-content: center;
1315+
font-size: 12px;
1316+
line-height: 1;
13051317
z-index: 1;
1306-
}
13071318

1308-
.nav-forward-btn {
1309-
top: 7px;
1310-
padding: 4px 6px;
1311-
.sprite-icon(0, 0, 13px, 13px, "images/sprites.svg#rightArrow");
1312-
background-position: center;
1313-
background-size: cover;
1314-
opacity: 0.8;
1315-
z-index: 1;
1319+
i {
1320+
pointer-events: none;
1321+
}
13161322
}
13171323

1318-
.nav-back-btn-disabled {
1319-
top: 7px;
1320-
padding: 4px 6px;
1321-
.sprite-icon(0, 0, 13px, 13px, "images/sprites.svg#leftArrowDisabled");
1322-
background-position: center;
1323-
background-size: cover;
1324+
.nav-back-btn,
1325+
.nav-forward-btn {
13241326
opacity: 0.8;
1325-
z-index: 1;
13261327
}
13271328

1329+
.nav-back-btn-disabled,
13281330
.nav-forward-btn-disabled {
1329-
top: 7px;
1330-
padding: 4px 6px;
1331-
.sprite-icon(0, 0, 13px, 13px, "images/sprites.svg#rightArrowDisabled");
1332-
background-position: center;
1333-
background-size: cover;
1334-
opacity: 0.8;
1335-
z-index: 1;
1331+
opacity: 0.35;
1332+
pointer-events: none;
13361333
}
13371334

13381335
.splitview-icon-none {

0 commit comments

Comments
 (0)