Skip to content

Website: align icons with their text - #7

Closed
AdminGodZ wants to merge 1 commit into
mainfrom
fix-icon-alignment
Closed

AdminGodZ wants to merge 1 commit into
mainfrom
fix-icon-alignment

Conversation

@AdminGodZ

Copy link
Copy Markdown
Owner

Icons next to text (the GitHub link in the header, the button icons, the "Other systems" chevron, the system list, footer links) sat about a pixel low.

Cause: flex centring puts the icon on the middle of the text's box, but Newsreader sits high in its box. Measured with the bundled font: ascent .74em, descent .26em, cap height .715em, x-height .512em. The box's middle is .50em from the top; the middle of the lowercase is .48em and of capitals .38em. Halfway between those (the optical middle of mixed-case words like "GitHub") is .07em above the box's middle.

  • Inline icons (.with-icon > .icon, .button > .icon, the "Other systems" chevron) are lifted by .07em with translate, so the chevron's rotation still works.
  • The info icon in the Mac note is aligned to its first line with the same numbers (margin-top: .18em instead of .3em).
  • Block icons (the three facts, the "How it works" tiles) don't sit beside text and are unchanged.

Checked: astro check (0 errors, 0 warnings), astro build, and a zoomed before/after render of the header link, hero buttons and chevron with the built CSS and fonts.

Flex centring put icons on the middle of Newsreader's text box, which sits
.07em below the middle of its letters, so every icon beside text looked a
little low. Lift them by that much; the Mac note's info icon gets the same
correction on its first line.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
broadside Ready Ready Preview Nov 20, 2026 8:54am UTC

AdminGodZ added a commit that referenced this pull request Nov 20, 2026
…smarter download

- Styles move to Tailwind v4 utilities. global.css keeps the theme (colours that
  follow the colour scheme, fonts, breakpoint, spacing), base typography, the paper
  grain and the icon lift; the replay board's SVG keeps its CSS, being drawn by script.
  New Button component for the site's buttons.
- Icons are centred on the capitals of their label: flex centring puts them on
  Newsreader's em box middle, .1em lower (ascent .735, cap height .67). Supersedes
  the .07em lift from fix-icon-alignment (#7), merged in here.
- New section after the hero, "The strongest Battleship engine we know of", around
  the numbers that were there, with the density bot's 44.8 for comparison and a
  link to the measurements.
- Download: detection runs inline before the section renders, so the button never
  switches after load; Intel Macs are told apart where the browser reveals the CPU
  (Chromium) or the graphics chip (Firefox). The instructions follow the system:
  broadside.exe on Windows, the Gatekeeper note only on Macs, a hint to play in the
  browser on phones and tablets; everything shows when the system is unknown.
AdminGodZ added a commit that referenced this pull request Nov 20, 2026
…n, smarter download (#8)

* Website: align inline icons with the text's optical middle

Flex centring put icons on the middle of Newsreader's text box, which sits
.07em below the middle of its letters, so every icon beside text looked a
little low. Lift them by that much; the Mac note's info icon gets the same
correction on its first line.

* Website: hero fills the first screen, fonts without the flash, steady download menu

- Header and hero together fill the viewport, so the numbers start below the fold.
- GitHub links (header and footer) open in a new tab, with an icon that says so
  and "(opens in a new tab)" for screen readers.
- Fonts go through Astro's fonts API: preloaded from the HTML head, so they arrive
  with the page instead of after the stylesheet, with metric-matched fallbacks.
  Newsreader uses font-display: fallback, the stencil name block. Latin only.
- "Other systems" opens as a menu over the page instead of pushing content down;
  a click elsewhere or Escape closes it.

* Website: Tailwind, icons centred on capitals, a section on strength, smarter download

- Styles move to Tailwind v4 utilities. global.css keeps the theme (colours that
  follow the colour scheme, fonts, breakpoint, spacing), base typography, the paper
  grain and the icon lift; the replay board's SVG keeps its CSS, being drawn by script.
  New Button component for the site's buttons.
- Icons are centred on the capitals of their label: flex centring puts them on
  Newsreader's em box middle, .1em lower (ascent .735, cap height .67). Supersedes
  the .07em lift from fix-icon-alignment (#7), merged in here.
- New section after the hero, "The strongest Battleship engine we know of", around
  the numbers that were there, with the density bot's 44.8 for comparison and a
  link to the measurements.
- Download: detection runs inline before the section renders, so the button never
  switches after load; Intel Macs are told apart where the browser reveals the CPU
  (Chromium) or the graphics chip (Firefox). The instructions follow the system:
  broadside.exe on Windows, the Gatekeeper note only on Macs, a hint to play in the
  browser on phones and tablets; everything shows when the system is unknown.

* Website: underline links in text again, hover underline on icon links, roomier sunk ships, open source in the hero

- Tailwind's reset had dropped every link's underline; links in running text (AdminGod,
  MIT license) are underlined again. Standalone icon links (GitHub, How it was measured,
  Read the full method, Source, Releases) underline on hover.
- Sunk ships: the outline sits 0.8 inside the cells (was 1.6) and crosses reach 2.0
  (was 2.4), so outline and crosses no longer touch.
- Hero: "Free, fully open source, and it runs offline."
@AdminGodZ

Copy link
Copy Markdown
Owner Author

Superseded by #8, which merged this branch and corrected the lift from .07em to .1em (centred on Newsreader's capitals).

@AdminGodZ AdminGodZ closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant