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

Remove a css property from a css class and create another css class

I have a css class for a button

.uploadImage-button {
  @include myTheme.theme-aware('background-color', 'formImageUploadButtonColor-bg');
  min-width: 10rem;
  height: 3.125rem;
  margin-right: 3rem;
  margin-bottom: 1rem;
  border: 1px solid white;
  border-radius: 0.125rem;
  color: #ffffff;
}

I need the same css class properties of uploadImage-button except margin-right: 3rem; not included in it.
is there a way to achieve this

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 :

This may be done by making a new CSS class that overrides the margin-right property and inherits all the other attributes from the.uploadImage-button class.

.uploadImage-button {
  @include myTheme.theme-aware('background-color', 'formImageUploadButtonColor-bg');
  min-width: 10rem;
  height: 3.125rem;
  margin-right: 3rem;
  margin-bottom: 1rem;
  border: 1px solid white;
  border-radius: 0.125rem;
  color: #ffffff;
}

.uploadImage-button-no-margin {
  @extend .uploadImage-button;
  margin-right: 0;
}

I hope I have helped you

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