News for hackers. Stuff that matters.
Re:CSS is powerful, you can do a lot of things without JS by adamjc on Tuesday July 05, 2016 @04:37AM (#12035113)
The problem with relying on anchors means it stays in the browser history, so if you press 'back', you get the modal dialog again!

I don't think this is very useful, but it is a fun exercise in CSS.

Re:CSS is powerful, you can do a lot of things without JS by taspeotis on Tuesday July 05, 2016 @04:55AM (#12035180)
Just use JavaScript to clear the browser history. Bingo! Pure CSS modal.
Re:CSS is powerful, you can do a lot of things without JS by pori on Tuesday July 05, 2016 @05:12AM (#12035241)
I see what you did there.
Re:CSS is powerful, you can do a lot of things without JS by MarkCole on Tuesday July 05, 2016 @05:29AM (#12035302)
To be fair in some cases this can be a benefit. There have been occasions where I have wanted to link to content contained within a modal. You are right in that there are also occasions where this isn't desired.
Re:CSS is powerful, you can do a lot of things without JS by zepolen on Tuesday July 05, 2016 @07:25AM (#12035647)
Modal can be used with checkbox - and it's sweet: https://codepen.io/Idered/pen/vytkH
Re:CSS is powerful, you can do a lot of things without JS by dr_swe on Tuesday July 05, 2016 @04:56AM (#12035182)
Well, you can manipulate the browser history to remove those anchor links :)
Re:CSS is powerful, you can do a lot of things without JS by adamors on Tuesday July 05, 2016 @04:59AM (#12035196)
With CSS?

It's just easier to do this with Javascipt without hacking the history.

Re:CSS is powerful, you can do a lot of things without JS by mungoid on Tuesday July 05, 2016 @09:44AM (#12036353)
Sure, just have the user follow a step-by-step guide on deleting the last x items in their history every time ;-)
Re:CSS is powerful, you can do a lot of things without JS by choult on Tuesday July 05, 2016 @04:59AM (#12035195)
... but perhaps not with CSS...