79278893

Date: 2024-12-13 15:58:55
Score: 0.5
Natty:
Report link

Currently, some browsers do not support event.originalEvent.propertyName === 'height' when the initial or final CSS property is set to auto. To address this, the best approach is to use CSS's feature detection to apply a static height value for browsers that do not support this behavior. Below is an example implementation:

body > header {
    height: 8.25em;
    transition: height 500ms ease-out;
}

@media only screen and (max-width: 1000px) {

    body > header {
        height: 6.25em;
    }

}

/* Styles for Chromium-based browsers (excluding Firefox & Safari) */
@supports (-webkit-appearance: none) and (not (-moz-appearance: none)) and (not (-webkit-touch-callout: none)) {

    body > header {
        height: auto;
    }

}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: A-Z