You can only call one or two classes from an entire library in HTML/Css

Asked

Viewed 32 times

1

I’m making a website and I’m already finishing, but to make my site responsive I would need two classes from the Materialize library. The intention was to take only these two classes because by inserting the entire library my entire site changes. (Website without library link and website with library link respectively) Site sem o link da biblioteca ()

Site com o link da biblioteca

  • Yeah, but what library are you using?

  • When I learned I was taught to make my own classes, my own . menu for example, apart from that I used bootstrap for the columns

  • But the library is yours then?

  • The library I want to import is Materialize, like placing the link and then specifying that I want to join the class x and y For example: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" > and there define somehow that the only things I want to get from there are the sidenav-Trigger and sidenav classes

1 answer

1


Cannot import only one class from a css file or library. What you could do is mark the classes that will overwrite everything with the element !important tag in CSS, which means it will not be overwritten, and use only the class you want from the library. Other thing you can do is go in this online library, take only the classes you will use and put in a file and use :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.