Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Have 2 types of sized in google icon font

I need to have 2 types of menu

one with small icons and one with larger icons

I have tried adding small class

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<!DOCTYPE html>
<html>

<body>
<!doctype html>
<html lang="en">
  <head>
  
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@40,400,0,0" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    
    <style>
    <style>
.material-symbols-outlined {
    font-variation-settings: "FILL"0,"wght"400,"GRAD"0,"opsz"40
}

.material-symbols-outlined-small {
    font-variation-settings: "FILL"0,"wght"100,"GRAD"0,"opsz"24

}

</style>
    
    </style>
    
    
  </head>
  
  <body>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
    
<ul class="dropdown-menu dropdown-menu-lg-end show" style=" margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
                <li><a class="dropdown-item" href="#"><span class=" material-symbols-outlined align-middle">share</span>&nbsp;Export</a></li>
                <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">edit</span>&nbsp;Duplicate</a></li>
                <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined align-middle">delete</span>&nbsp;Delete</a></li>
            </ul>
            

<ul class="dropdown-menu dropdown-menu-lg-end show" style="inset: 0px 0px auto auto; margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
                <li><a class="dropdown-item" href="#"><span class=" material-symbols-outlined align-middle">share</span>&nbsp;Export</a></li>
                <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">edit</span>&nbsp;Duplicate</a></li>
                <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined align-middle">delete</span>&nbsp;Delete</a></li>
            </ul>
            

  </body>
</html>

>Solution :

The class material-symbols-outlined is reserved for Google Material Symbols. You cannot change it to material-symbols-outlined-small and expect Google Material Symbols to work. Instead, add the second class (e.g., small).

WRONG:

<li><a class="dropdown-item" href="#"><span class="material-symbols-outlined-small align-middle">share</span>&nbsp;Export</a></li>

CORRECT:

<li><a class="dropdown-item" href="#"><span class="material-symbols-outlined small align-middle">share</span>&nbsp;Export</a></li>

See the snippet below.

.material-symbols-outlined {
  font-variation-settings: "FILL"0, "wght"400, "GRAD"0, "OPSZ"40;
}

.material-symbols-outlined.small {
  font-variation-settings: "FILL"0, "wght"100, "GRAD"0, "OPSZ"24;
}
<!doctype html>
<html lang="en">

<head>
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" />
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
</head>

<body>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>

  <ul class="dropdown-menu dropdown-menu-lg-end show" style=" margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
    <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">share</span>&nbsp;Export</a></li>
    <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined align-middle">edit</span>&nbsp;Duplicate</a></li>
    <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined align-middle">delete</span>&nbsp;Delete</a></li>
  </ul>


  <ul class="dropdown-menu dropdown-menu-lg-end show" style="inset: 0px 0px auto auto; margin: 0px; transform: translate3d(0px, 38.4px, 0px);" data-popper-placement="bottom-end">
    <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined small align-middle">share</span>&nbsp;Export</a></li>
    <li><a class="dropdown-item" href="#"><span class="material-symbols-outlined small align-middle">edit</span>&nbsp;Duplicate</a></li>
    <li><a class="dropdown-item tdelete" href="#"><span class="material-symbols-outlined small align-middle">delete</span>&nbsp;Delete</a></li>
  </ul>
</body>

</html>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading