I Made Night Mode, Have a look

Hi readers, some time ago I was learning how to make dark mode work, I made it then, Please have a look at the Codepen and if you are also learning it you can take some inspiration from the code.
https://codepen.io/kamaljyotwal/full/dyMVJdx

5 Likes

Cool, good job. Often night mode is handled on a deeper level, but still this is a slick toy project.

Looking at the code, is there a reason you did:

  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;

instead of:

  border-radius: 15px;

Also, this looks add to me:

  border-radius: 50%;
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;

But I’m no CSS wizard.

You are right, I think i was trying some variations of different values of border-radius and ending up using the same and forgot to use the one-line syntax.

I have been a follower of yours since I joined here and have read your GitHub repo as well.
Would you mind providing some feedback on my portfolio site.
It not completely ready yet that why I haven’t posted it publicly.
I will make a post for it when it is ready.
site

Thanks.

1 Like

Sure, I’ll take a look tonight and respond in PM.

2 Likes

This looks great :grin: i was actually wondering how to make the dark mode work and this helped me, thank you. Keep up the good work.

1 Like