When I comment my code I try to describe my thoughts in that moment. Often it’s the description of realisation features, description of problem, warning, requests for assistance, etc.
For example, I describe why I use the variable in the following comment:
/* The --vetStoryPanelHeight variable uses to set the height of a panel item and a gap that prevents the case when the panel displays over the page content */
Here I tell about the realisation features:
/* The .button:not(button) selector helps to add special properties for the button component that isn't the button element. */ /* I use the after pseudo-element to create the bottom border because it doesn't affect on height of the .panel__container element */
Here I describe the magic numbers that I use in the code:
/* The right border of button have to be hidden through 0.25s so I use the 0.25s value as the third argument */