Get the latest tech news

A couple CSS tricks for HTML Dialog elements


You can use CSS to add some simple functionality to HTML <dialog> elements!

If you want to see a decent quick example of them in action, you can check out my game Jumblie and click the Settings gear button at the top. There’s a couple tricks that you might find handy when you’re implementing your own<dialog> s on your websites! This selector checks to see if the<body> has a<dialog> with the open attribute.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of couple

couple

Photo of css

css

Photo of CSS tricks

CSS tricks

Related news:

News photo

Alienware’s 27-inch 4K 240Hz OLED monitor is only a couple months away

News photo

Fortnite OG will rotate Chapter 1 seasons every couple of months

News photo

CSS gets a new logo and it uses the color `rebeccapurple`