Skip to content

Conversation

@Kulsum-ahmad
Copy link
Contributor

@Kulsum-ahmad Kulsum-ahmad commented Oct 11, 2025

Hello! I'm submitting this contribution for Hacktoberfest.

This PR introduces a new component: a Pure CSS Dismissible Alert/Notification.

What it does:
Demonstrates how to create a typical website alert (like a cookie banner or success message) that can be permanently closed by the user.

The dismissal functionality is achieved entirely using the Checkbox Hack ( combined with the CSS sibling selector :checked).

No JavaScript is used for toggling visibility or animating the exit.

@aayush105
Copy link
Member

Please provide the demo video of your project. @Kulsum-ahmad

@Kulsum-ahmad
Copy link
Contributor Author

Kulsum-ahmad commented Oct 12, 2025

Recording.2025-10-12.094750.mp4

Sure, i have attached the demo video @aayush105

@aayush105
Copy link
Member

@Kulsum-ahmad

Only success alert?

Could you please add the multiple alerts, like error, info, warnings and so on.

@Kulsum-ahmad
Copy link
Contributor Author

Kulsum-ahmad commented Oct 12, 2025

Hi! @aayush105 , I'm happy to confirm that the changes have been implemented successfully. I expanded the demo to include Error, Warning, Info and some more alert types, all using the same pure CSS Checkbox Hack logic.

The changes have been pushed to this branch only. Thank you again for the feedback! I'm excited to have this contribution merged for Hacktoberfest.

I have also added the video demo video link:
Uploading Dismissible alerts.mp4…

Copy link
Member

@aayush105 aayush105 left a comment

Choose a reason for hiding this comment

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

LGTM! @Kulsum-ahmad

Thank you for your contribution.

@aayush105 aayush105 merged commit dd7f03a into you-dont-need:master Oct 12, 2025
@Kulsum-ahmad Kulsum-ahmad mentioned this pull request Oct 15, 2025
rishu685 pushed a commit to rishu685/You-Dont-Need-JavaScript that referenced this pull request Oct 15, 2025
…ss-dismissible-alert

feat: Add Pure CSS Dismissible Alert Demo (No JS needed)
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