0

I just want to change font behaviour based on the website, how to add if - else condition in css.

My CSS :

td.email-heading h1 {
  font-weight: 700;
  font-size: 16px;
  margin: 1em 0;
  line-height: 20px;
  text-transform: uppercase;
}

If website 1 font-weight: 700 should work, if website 2 should not work.

zus
  • 194
  • 2
  • 16
  • 1
    CSS itself doesn't have if - else conditions. See if the answers on here will help you: https://stackoverflow.com/q/1129699/12926834 – captiveCorsair Mar 16 '20 at 12:17

1 Answers1

0

CSS does not have IF, else functionality built in. you can use JS jQuery as easy alternatives.

depending on what condition needs to be met (as it was not specified in the question) @media might be a solution for you in case the condition is screen dimensions. more on @media here: https://www.w3schools.com/Css/css3_mediaqueries_ex.asp

Plague3D
  • 40
  • 3
  • Can i copy css from skin\frontend\base\default\css\email-inline.css to skin\frontend\default\theme\css\email-inline.css and change some css effect is recommend? – zus Mar 18 '20 at 09:56