Avoiding conflicts by preventing media queries using the same value for both a min-width and a max-width.

The attached patch will move from the current CSS that has two conflicts:

@media screen and (max-width: 320px) {
  /* Smartphone */
}
@media screen and (min-width: 320px) and (max-width: 760px) {
  /* Tablet */
}
@media screen and (min-width: 760px) {
  /* Standard */
}

To this CSS that has no conflicts:

@media screen {
  /* Smartphone */
}
@media screen and (min-width: 320px) {
  /* Tablet */
}
@media screen and (min-width: 760px) {
  /* Standard */
}

Comments

mustanggb’s picture

Status: Active » Needs review
mustanggb’s picture

Correct patch attached.

mustanggb’s picture

Issue summary: View changes

Update

michel.g’s picture

Issue summary: View changes
StatusFileSize
new693 bytes

I think I have a better solution for the current version of the module.

michel.g’s picture

StatusFileSize
new796 bytes

Patch didn't work as intended, uploading a new version.