Skip to content

Improve CSS-only UI, HUD, documentation, and build workflow#4

Open
dgmnzrd wants to merge 12 commits into
BenjaminAster:mainfrom
dgmnzrd:main
Open

Improve CSS-only UI, HUD, documentation, and build workflow#4
dgmnzrd wants to merge 12 commits into
BenjaminAster:mainfrom
dgmnzrd:main

Conversation

@dgmnzrd
Copy link
Copy Markdown

@dgmnzrd dgmnzrd commented Jun 5, 2026

Summary

This PR improves the CSS-only Minecraft experience while keeping the project JavaScript-free at runtime.

Changes

  • Improved the welcome panel to feel more like a game UI.
  • Added clearer block labels, tooltips, and accessibility labels.
  • Redesigned the bottom controls into a more game-like HUD.
  • Added active mode feedback for building/removing blocks.
  • Added quick HUD hints for basic gameplay.
  • Improved responsive behavior for smaller screens.
  • Added world presets and clearer world configuration.
  • Added documentation for world configuration and architecture.
  • Added a pnpm-based build workflow.
  • Ignored generated files such as index.html, main.css, and main.css.map.
  • Split the Sass code into focused partials for easier maintenance.

Notes

The final page still uses only HTML and CSS. No JavaScript was added to the runtime game logic.

Copilot AI review requested due to automatic review settings June 5, 2026 22:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Refactors the project into a more maintainable SCSS + Pug structure, adds documentation, and improves the UI/UX (HUD panels, responsive layout, and accessibility attributes) while keeping the CSS-only interaction model.

Changes:

  • Split the previous monolithic main.scss into multiple SCSS partials and centralized block tokens.
  • Expanded index.pug UI (inventory, mode status, hints) and introduced world-size presets with inline status display.
  • Added project docs (WORLD_CONFIG.md, ARCHITECTURE.md), build tooling (package.json), and ignored generated artifacts (main.css, index.html).

Reviewed changes

Copilot reviewed 14 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
main.scss Replaced monolithic styles with @use imports of partials
styles/_tokens.scss Centralizes $blocks and CSS custom properties (images, sizing)
styles/_base.scss Base element styling extracted from previous main.scss
styles/_info.scss New structured info panel styling
styles/_controls.scss New HUD/control panel styling + :has() driven state UI
styles/_world.scss Extracted 3D world/cube styling and selection-driven visuals
styles/_interactions.scss Hover/focus/“remove mode” interaction styling
styles/_responsive.scss Responsive adjustments and reduced-motion handling
index.pug Adds world presets, HUD layout, ARIA labels, and more preloads
README.md Expanded setup/build/run documentation
WORLD_CONFIG.md Documents DOM-per-position performance implications + presets
ARCHITECTURE.md Explains the CSS-only architecture and interaction model
.gitignore Stops committing generated build outputs
package.json Adds local build/dev scripts and dev dependencies
main.css Removed generated CSS artifact from the repo
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread styles/_controls.scss
Comment on lines +95 to +107
& .mode-message.air {
color: #ff9b9b;
--mode-image: var(--pickaxe-image);

&::before {
border-radius: 999rem;
}
}

@each $block in $blocks {
& .mode-message.#{$block} {
--mode-image: var(--#{$block}-image);
}
Comment thread styles/_interactions.scss
Comment on lines +27 to +32
.controls label:focus-visible,
.controls button:focus-visible,
.info .close:focus-visible {
outline: 3px solid #f7d66d;
outline-offset: 3px;
}
Comment thread styles/_world.scss
Comment on lines +148 to +150
&:has(> .cube.#{list.nth($blocks, 1)} > input[type=radio]:checked) {
display: none;
}
Comment thread index.pug
//- Current block types: 8
//-

- const worldPresets = { small: { layers: 7, rows: 7, columns: 7 }, default: { layers: 9, rows: 9, columns: 9 }, large: { layers: 11, rows: 11, columns: 11 }, experimental: { layers: 13, rows: 13, columns: 13 } };
Comment thread styles/_controls.scss
Comment on lines +247 to +251
@each $block, $_ in $blocks {
&:has(.block-chooser > .#{$block} > input[type=radio]:checked) ~ main .cubes-container > .cube:not(.#{$block}) {
display: none;
}
}
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.

2 participants