Vendor Prefixes and Compatibility

suggest change

Vendor prefixes such as -webkit-, -moz-, and -ms- were historically used for experimental browser features. Most established CSS features—including Grid, Flexbox, transforms, transitions, animations, columns, filters, and border radius—should now be written with their standard, unprefixed names.

.card {
  transform: translateY(-0.25rem);
  transition: transform 180ms ease;
}

Do not copy a list of every historical prefix into new code. A prefixed and unprefixed property can represent different revisions of a feature, so adding prefixes does not automatically produce a valid fallback.

Define the project's supported browser range from actual requirements. If compatibility tooling is part of the build, use a maintained processor such as Autoprefixer with that browser policy. It adds only the prefixes required by the configured targets.

Occasionally a prefixed API remains the interoperable spelling—for example, the legacy multi-line -webkit-line-clamp pattern. Treat such cases as documented exceptions and include an acceptable fallback.

Use @supports for progressive enhancement when a newer feature is optional:

.gallery {
  display: flex;
  flex-wrap: wrap;
}

@supports (display: grid) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
}

Unsupported declarations are ignored, so place a working baseline before an enhanced declaration when a fallback is necessary.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents