Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target WebKit browsers only in CSS? (2019 Edition)

Tags:

css

webkit

target

Have been using the neat little

@media screen and (-webkit-min-device-pixel-ratio:0) {}

selector until now, and it worked flawlessly. But since a few months, FireFox is also able to process this code, as well as Microsoft Edge apparently.

So yeah, are there any working alternatives left for a CSS-only approach?

like image 217
Nefiji Avatar asked Nov 07 '22 22:11

Nefiji


1 Answers

To target Firefox Quantum use:

@-moz-document url-prefix() {
  @supports (animation: calc(0s)) {
      /* Firefox Quantum specific styles */
  }
}

for Edge, use:

@supports (-ms-ime-align: auto) {
  /* Edge specific styles */
}
like image 134
Anon Avatar answered Nov 15 '22 07:11

Anon