Updating existing CSS with MDC library

132 views Asked by At

Google recently announced material components, which is a modular component library that strongly follows material design language.

So what I wanna do is update my existing CSS classes (web) with MDC class variables (only variables as I can't alter current classes). I've tried using mixins (since MDC comes with a complete library of it). But these are too modularized which makes it difficult to keep all the variables within a single css selector.

Example:

MDC class selector variable (from imported MDC stylesheet):

.mdc-button--raised {background-color: red;}

Current: .current-button {background-color: none;)

Ideally: .current-button {go to mdc-button--raised and set background-color: red;}

Are there any options to move (and repeat) css variables from one class selector to another? Or maybe there's another way to 'link' variables of an existing class to another one?

0

There are 0 answers