Comment to 'How to change the search icon in the top search box?'
  • Well, the respective dimensions that are declared in the standard .svg file don't really matter when they are overwritten by CSS. You can control the size however you want via CSS, no matter what values are set inside the SVG file.

    For example:

    svg {
    width: 32px;
    height: 32px;
    } 
    

    This will force any SVG element to display at 32x32px, regardless of its internal width and height attributes.

    The only thing that really matters inside the SVG is the viewBox, because it defines how the content inside scales and keeps its aspect ratio when you resize it with CSS. As long as the viewBox is set properly, you can style the size however you like from outside.

    Also, if the SVG is inline, it’s a good idea to double-check for any other CSS that might affect its size, like max-width, max-height, or font-size if it’s inside a button or toolbar.