Issue: GitHub Snake wont display properly in browser fullscreen mode
Description:
The GitHub Snake animation/game does not display properly when the browser is in fullscreen mode. Users are experiencing display issues when trying to use the feature in fullscreen.
**Issue:** GitHub Snake wont display properly in browser fullscreen mode
**Description:**
The GitHub Snake animation/game does not display properly when the browser is in fullscreen mode. Users are experiencing display issues when trying to use the feature in fullscreen.
Resolved -- Added :host-context(:fullscreen) CSS rules in github-snake.component.scss for responsive grid scaling in fullscreen mode. The grid now scales dynamically based on viewport dimensions when in fullscreen.
**Resolved** -- Added `:host-context(:fullscreen)` CSS rules in `github-snake.component.scss` for responsive grid scaling in fullscreen mode. The grid now scales dynamically based on viewport dimensions when in fullscreen.
Reopening — the :host-context(:fullscreen) CSS fix from May 5 did not fully resolve this.
The game grid still renders incorrectly when the browser is in fullscreen mode. Looking at the screenshot, the grid tiles overflow the visible area and the layout doesn't adapt to the full viewport height — the snake board is clipped at the bottom and the contribution-graph style squares extend beyond the playable/visible region.
The previous fix addressed scaling via :host-context(:fullscreen) but the underlying issue appears to be that the grid container's height calculation doesn't account for the full viewport in fullscreen (likely still using a fixed pixel height or a vh-based value that doesn't update correctly when the browser chrome disappears in fullscreen).
To investigate:
Check whether the grid canvas/container has a fixed height that needs to become 100vh (or 100dvh) in fullscreen.
The :host-context(:fullscreen) selector may not be matching if the fullscreen element is the browser's native F11 fullscreen rather than a programmatic requestFullscreen() on the component — F11 fullscreen doesn't set the :fullscreen pseudo-class on any element.
May need a @media (display-mode: fullscreen) or a resize observer fallback for the F11 case.
**Reopening** — the `:host-context(:fullscreen)` CSS fix from May 5 did not fully resolve this.
The game grid still renders incorrectly when the browser is in fullscreen mode. Looking at the screenshot, the grid tiles overflow the visible area and the layout doesn't adapt to the full viewport height — the snake board is clipped at the bottom and the contribution-graph style squares extend beyond the playable/visible region.
The previous fix addressed scaling via `:host-context(:fullscreen)` but the underlying issue appears to be that the grid container's height calculation doesn't account for the full viewport in fullscreen (likely still using a fixed pixel height or a `vh`-based value that doesn't update correctly when the browser chrome disappears in fullscreen).
**To investigate:**
- Check whether the grid canvas/container has a fixed `height` that needs to become `100vh` (or `100dvh`) in fullscreen.
- The `:host-context(:fullscreen)` selector may not be matching if the fullscreen element is the browser's native F11 fullscreen rather than a programmatic `requestFullscreen()` on the component — F11 fullscreen doesn't set the `:fullscreen` pseudo-class on any element.
- May need a `@media (display-mode: fullscreen)` or a resize observer fallback for the F11 case.
Fixed — the root cause was simpler than the fullscreen pseudo-class theory:
The .container had width: fit-content but no centering mechanism — it just sat at the default flow position (top-left of the route viewport).
The previous :host-context(:fullscreen) rules only applied centering when a fullscreen pseudo-class was active, which doesn't fire for F11 browser fullscreen anyway.
Changes:
Added :host { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; } so the game is always centered in its viewport regardless of fullscreen mode.
Switched the grid from fixed 12px cells to responsive clamp(10px, 1.4vw, 14px) so it scales smoothly at any viewport size (including fullscreen) without needing separate fullscreen overrides.
Removed the dead :host-context(:fullscreen) rules since centering is now unconditional.
**Fixed** — the root cause was simpler than the fullscreen pseudo-class theory:
1. The `.container` had `width: fit-content` but no centering mechanism — it just sat at the default flow position (top-left of the route viewport).
2. The previous `:host-context(:fullscreen)` rules only applied centering when a fullscreen pseudo-class was active, which doesn't fire for F11 browser fullscreen anyway.
**Changes:**
- Added `:host { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }` so the game is always centered in its viewport regardless of fullscreen mode.
- Switched the grid from fixed `12px` cells to responsive `clamp(10px, 1.4vw, 14px)` so it scales smoothly at any viewport size (including fullscreen) without needing separate fullscreen overrides.
- Removed the dead `:host-context(:fullscreen)` rules since centering is now unconditional.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Issue: GitHub Snake wont display properly in browser fullscreen mode
Description:
The GitHub Snake animation/game does not display properly when the browser is in fullscreen mode. Users are experiencing display issues when trying to use the feature in fullscreen.
Resolved -- Added
:host-context(:fullscreen)CSS rules ingithub-snake.component.scssfor responsive grid scaling in fullscreen mode. The grid now scales dynamically based on viewport dimensions when in fullscreen.Reopening — the
:host-context(:fullscreen)CSS fix from May 5 did not fully resolve this.The game grid still renders incorrectly when the browser is in fullscreen mode. Looking at the screenshot, the grid tiles overflow the visible area and the layout doesn't adapt to the full viewport height — the snake board is clipped at the bottom and the contribution-graph style squares extend beyond the playable/visible region.
The previous fix addressed scaling via
:host-context(:fullscreen)but the underlying issue appears to be that the grid container's height calculation doesn't account for the full viewport in fullscreen (likely still using a fixed pixel height or avh-based value that doesn't update correctly when the browser chrome disappears in fullscreen).To investigate:
heightthat needs to become100vh(or100dvh) in fullscreen.:host-context(:fullscreen)selector may not be matching if the fullscreen element is the browser's native F11 fullscreen rather than a programmaticrequestFullscreen()on the component — F11 fullscreen doesn't set the:fullscreenpseudo-class on any element.@media (display-mode: fullscreen)or a resize observer fallback for the F11 case.Fixed — the root cause was simpler than the fullscreen pseudo-class theory:
.containerhadwidth: fit-contentbut no centering mechanism — it just sat at the default flow position (top-left of the route viewport).:host-context(:fullscreen)rules only applied centering when a fullscreen pseudo-class was active, which doesn't fire for F11 browser fullscreen anyway.Changes:
:host { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }so the game is always centered in its viewport regardless of fullscreen mode.12pxcells to responsiveclamp(10px, 1.4vw, 14px)so it scales smoothly at any viewport size (including fullscreen) without needing separate fullscreen overrides.:host-context(:fullscreen)rules since centering is now unconditional.