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

How to follow another CSS selector's properties?

I’m using Bootstrap CSS and I want my site to consistently use the same button design (class="btn btn-primary"). But there’s a plugin I’m using that has its own class for buttons ("ethpress-metamask-login-button").

So, how could I make ethpress-metamask-login-button class to follow btn btn-primary properties other than copying each property over to ethpress-metamask-login-button declaration block?

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

>Solution :

If you define your own styling for .btn.btn-primary, you could just extend the selector like this:

.btn.btn-primary, .ethpress-metamask-login-button {….}

If you are using SCSS/SASS you can use the @extend function

Or simply unset properties that are set by default for ethpress-metamask-login-button and add a class btn btn-primary to the HTML tag..

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