fixed issue:Add Glassmorphic Effect to Navbar#732
Open
cheshtagarg28 wants to merge 1 commit intoSurajSG23:mainfrom
Open
fixed issue:Add Glassmorphic Effect to Navbar#732cheshtagarg28 wants to merge 1 commit intoSurajSG23:mainfrom
cheshtagarg28 wants to merge 1 commit intoSurajSG23:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Fixes # 727
Description
This pull request overhauls the site's main header, replacing the previous solid-color background with a modern glassmorphism effect. The new navbar is semi-transparent with a background blur, providing a sense of depth and a more premium aesthetic.
Crucially, this implementation is fully theme-aware. The navbar's appearance dynamically adapts to both light and dark modes, ensuring a consistent and visually appealing experience for all users.
The Problem
The previous navbar had a solid background color. While clean, it looked dated and visually disconnected from the content below it, especially on pages with background images or gradients. It also did not adapt its style between light and dark themes.
The Solution
The solution involves a pure CSS implementation that leverages backdrop-filter for the blur effect and CSS variables for robust theming.
Glassmorphism Effect: The header element now uses a semi-transparent rgba() background color combined with backdrop-filter: blur().
Dynamic Theming: We introduced new CSS variables (--navbar-bg, --navbar-border) that are defined in :root for the default (light) theme and overridden in the body.dark scope for the dark theme.
Refactoring: The header styles were updated to use these new variables instead of hard-coded values, making the component adaptive and easier to maintain.
Type of change
Checklist