Fix font-size, add max-height, reduce z-index#3
Conversation
|
The
I'm not sure what possible overlapping you are referring to, could you give me an example? |
|
For example, existing project with fixed header, tooltips, modals etc with z-index from 1 to 999. Then select with too high z-index may overlap those components. It's common to adjust z-indexes everywhere for sure, just prefer to reduce too big z-indexes and keep them in 1-10 range. |
|
I admit I set those defaults to suit my own needs, but you are right that a z-index of 1 should be enough here. |
Replaced font-size from em to rem. Otherwise inheritance from parent could make the font-size in select too big e.g.
Changed height to auto and added max-height in case of small amount of options. Now the select options' container is too long if there is not too many options.
Reduced z-index to avoid possible overlappings with existing styles of any project.