DEV Community

Discussion on: I created an easy way to browse & find Google books (today is my birthday 🎈)

Collapse
 
liyasthomas profile image
Liyas Thomas

I currently don't use any 3rd party libraries. Just pure JavaScript, HTML & CSS. Of course I reuse most of my components, especially light/dark mode toggle, font stylings etc.

Collapse
 
ahmedmusallam profile image
Ahmed Musallam

I was looking at github.com/liyasthomas/books/blob/...

A lot of awesome things in there. and only 8KB unzipped or minified!

While inspecting the source I saw that

.category {
      height: 25vh;
}

Curious why you picked vh vs other units in this case?

I know users wont do this, but when shrinking the view-port height the title inside .category pops out :)

Thread Thread
 
liyasthomas profile image
Liyas Thomas

Nice you noticed that. What you explained is a bug/issue for sure.

But, sometimes some bugs are beautiful. At some use cases most of my apps would fail. But I don't mind that. Nothing is perfect. I'll certainly look into it and make it more better. Will add more bugs to fix later ðŸĪŠ

Thread Thread
 
ahmedmusallam profile image
Ahmed Musallam

hahaha. I was more curious about the vh and the use-case for using it than to report a bug that almost no one will notice.. lol 😁

Thread Thread
 
liyasthomas profile image
Liyas Thomas • Edited

As vh and vw changes with viewports, I like the ratio or say the proportion of UI more than giving a fixed unit. That's why I did that.

Thread Thread
 
ahmedmusallam profile image
Ahmed Musallam

I see, makes sense. thanks and keep on rockin' !