
Wait, you can build modal windows without JavaScript? Yep, that's CSS secretly laughing at JavaScript behind its back. At Lingo.dev, we love diving...
For further actions, you may consider blocking this person and/or reporting abuse
I find it a bit strange that nobody mentioned the dialog html element.
It is better than using a div and it has javascript events.
If you are feeling adventurous the CSS tricks from this post can be used. Personally I would stick to the small amount of javascript you need to add to make the dialog working.
Zero JS code is required if you use the Popover API with dialog element.
Thank you for sharing that, I didn't know it existed. From MDN I see it is an experimental feature.
You're welcome. It's only experimental if you use hint popovers:
developer.mozilla.org/en-US/docs/W...
Haha, yes, exactly!
We personally do use these tricks internally, but most of the time, from what we see, it's a design system / component library implementation detail.
This is just brilliant! Thank you for sharing with us! β¨
Thanks Anita :)
Neat solution, I thought I'd fork your solution and demo a no js needed no css needed solution π€―
I kid you not! I added CSS just to match your example, but it's not needed, and go for it disable js... still works github
Read more here: dev.to/jswhisperer/invoker-command...
it's also hella accessible!
nice! π₯
Great article!
Thanks Anthony!
pretty cool you can ditch js for stuff like this - honestly makes me wonder if iβm over-complicating my own setups. you think pushing css like this actually makes sites easier to maintain in the long run or nah?
Great question Nathan!
I think it boils down to how well this type of CSS is encapsulated in the code in the end.
I personally think CSS modals are elegant, though it isn't the most usual thing to do. :)
Pretty cool seeing CSS pushed like this. Makes me want to mess around and see what else I can pull off without JS.
Excellent article and well explained πππ»
From now on I won't make a modal any other way.
β‘β‘
Really loved how you explained both the :target method and the checkbox hack β super clear and practical. Itβs amazing how much we can do with just CSS!
CSS is becoming a programming language π
Cool CSS trick!
Yes, indeed!
pretty cool seeing css pull this off - makes me want to rethink some of my usual stacks haha. you ever find yourself secretly hoping to kick more js out of your projects?
Discover the Top Rated DevOps Course in Kannur with Guaranteed Placement β Only at TechCake
Are you searching for the best DevOps course in Kannur? Whether you're a fresher aiming to start your tech career or a professional looking to upskill, TechCake offers the top-rated DevOps course in Kannur, designed to equip you with the skills companies are hiring for.
Why DevOps?
DevOps has rapidly become one of the most in-demand skillsets in the IT industry. Combining development and operations, it enables faster software releases, improved team collaboration, and more stable systems. As more companies adopt DevOps practices, the demand for certified DevOps professionals has skyrocketed.
TechCake β The Best DevOps Training Institute in Kannur
At TechCake, we donβt just teach DevOps β we make you job-ready. As a leading DevOps training institute in Kannur, our curriculum is tailored to current industry standards, and our trainers are certified experts with real-world experience.
Hereβs what makes TechCake the preferred choice:
β Hands-on training with real-time projects
β Certified and experienced instructors
β Resume-building and mock interview sessions
β Weekend and weekday batch flexibility
β Access to DevOps tools like Jenkins, Docker, Kubernetes, Git, Ansible, and AWS
What Youβll Learn in Our DevOps Course in Kannur
Our DevOps course covers a full stack of modern DevOps tools and practices. Some of the key modules include:
Introduction to DevOps & its lifecycle
Source code management with Git
Continuous integration with Jenkins
Containerization using Docker
Configuration management with Ansible
Orchestration with Kubernetes
Cloud deployment using AWS
Monitoring and logging tools
This structured approach ensures that you become a certified DevOps engineer, ready to work on real-world problems.
DevOps Course with Placement in Kannur β 100% Assistance
At TechCake, we understand that learning is only part of the journey β getting a job is the goal. Thatβs why we offer a DevOps course with placement in Kannur, with active support through:
Resume reviews & optimization
Mock interviews with real-time scenarios
HR and recruiter connections
Internship opportunities for freshers
Many of our alumni are now placed in top IT companies across India and abroad.