How to disable a part of css property in safari?

Issue

I got a div and it got certain property of css.
What I want to do is I want to give the div certain color on safari is this possible?

<div class="disClass">Example div</div>

css

. divClass{
  width: 50px;
  height: 50px;
  background-color:'red'

  //safari only
  // background-color:'blue'
  //
}

Solution

This worked for me.

@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance: none) {
   .divClass {
       background: red;
    }
  }
}

hope it helps.

Answered By – R.dev

Answer Checked By – Willingham (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.