DEV Community

Discussion on: Neumorphism Sidebar Menu Using HTML and CSS

Collapse
 
sharakpl profile image
Info Comment hidden by post author - thread only visible in this permalink
Tom • Edited

Many flaws in your code:

  1. You shouldn't use "transition: all"
  2. You shouldn't animate "left". Use "transform: translateX()" instead and "transition: transform"
  3. You set every size with pixels. If you decide to change sidebar width at some point you have to also change other values every time. Otherwise your design will brake. Use % whenever possible.
  4. Try not to use id as selectors to avoid high specificity. Use classes instead.

Some comments have been hidden by the post's author - find out more