---
title: "Autoprefixer: CSS Grid and source maps in PostCSS | VulCode"
description: "Fixes to the Autoprefixer PostCSS plugin in JavaScript: inherited CSS Grid gaps, a source for grid prefixes in source maps and silencing single warnings."
url: "https://vulcode.com/en/opensource/contributions/autoprefixer"
lang: "en"
---

[All contributions](https://vulcode.com/en/opensource/contributions)

postcss/autoprefixer

# Autoprefixer

A PostCSS plugin that adds browser prefixes to CSS based on Can I Use data, including the -ms-grid syntax for CSS Grid layouts.

[See the repository](https://github.com/postcss/autoprefixer) [All contributions](https://vulcode.com/en/opensource/contributions)

- **Language**: JavaScript
- **GitHub stars**: 22,197
- **Merged changes**: 3

## What we changed

An inherited grid keeps the gap set with grid-row-gap and grid-column-gap, grid prefixes get the right source in source maps, and a new /* autoprefixer: ignore next warning */ comment hides a warning for one node without turning prefixes off.

### What this work shows

- PostCSS plugins and the CSS tree

- Source maps

- CSS Grid and the -ms-grid syntax

- CSS control comments

What was broken

### An inherited grid lost its gap

When a rule inherited grid-template-areas, Autoprefixer looked for the gap only in the grid-gap shorthand. If the container set grid-row-gap and grid-column-gap, the rule got -ms-grid-columns: (1fr)[2] instead of 1fr 50px 1fr, a grid without its gap.

How we fixed it

### One rule for both forms

The expression that recognises the shorthand and the longhands moved into a shared constant, and inheritance now applies it the same way getGridGap does. A test case covers a rule that inherits gaps set with the longhands.

[#1557](https://github.com/postcss/autoprefixer/pull/1557)

What was broken

### Grid prefixes without a source in the map

The -ms-grid-row and -ms-grid-column declarations and the @media rule around them were created without a source field. The source map showed <no source> for them instead of the CSS file they came from.

How we fixed it

### The source taken from the original node

Each added declaration now copies the source of the node it was generated from, and the @media rule takes it from the first rule it holds. A test processes three grid cases with a source map and checks that the sources list holds only the input file.

[#1559](https://github.com/postcss/autoprefixer/pull/1559)

What was broken

### A single warning could not be silenced

A grid with intentionally empty areas raised the Can not find grid areas warning, even though such a layout is valid. The ignore next comment could silence it only by also turning prefixes off for the next property.

How we fixed it

### An ignore next warning comment

We added a /* autoprefixer: ignore next warning */ comment that hides warnings only for the next property or rule, while prefixes are still added. Warnings now go through a shared warn function, and the ignore next pattern skips the new comment so it does not switch prefixing off.

[#1560](https://github.com/postcss/autoprefixer/pull/1560)

## Merged changes

3 from 15 September 2026 to 7 October 2026

- [01 #1557Merged 15 September 2026 Inherit grid gap set with the row-gap and column-gap longhands](https://github.com/postcss/autoprefixer/pull/1557)

- [02 #1559Merged 5 October 2026 Set source for Grid prefixes in source maps](https://github.com/postcss/autoprefixer/pull/1559)

- [03 #1560Merged 7 October 2026 Add `/* autoprefixer: ignore next warning */` control comment](https://github.com/postcss/autoprefixer/pull/1560)

## What it taught us

A tool that rewrites CSS must give the same result for shorthand and longhand properties and record every node it adds in the source map. A warning should be possible to silence in one place without switching the tool off for the whole rule.

[More about this technology: TypeScript, React and Node](https://vulcode.com/en/technologies/typescript-react-and-node)

## Other projects we write code for

- [**Material UI** JavaScript · 99,391 stars A React component library that implements Google's Material Design: ready-made text fields, selects, buttons and other interface elements.](https://vulcode.com/en/opensource/contributions/material-ui)

- [**Grafana** TypeScript · 78,050 stars An open observability and data visualisation platform that shows metrics, logs and traces from Prometheus, Loki, Elasticsearch, PostgreSQL and many other sources on dashboards.](https://vulcode.com/en/opensource/contributions/grafana)

- [**Marked** TypeScript · 37,323 stars A fast Markdown parser and compiler to HTML, written in TypeScript and following CommonMark and GitHub Flavored Markdown.](https://vulcode.com/en/opensource/contributions/marked)

- [**Lichess** TypeScript · 19,013 stars The lichess.org chess server: free, ad-free and open source, focused on real-time play. The back end is written in Scala, the interface in TypeScript.](https://vulcode.com/en/opensource/contributions/lichess)

- [**compromise** JavaScript · 12,176 stars A natural language processing library in JavaScript: it splits text into sentences and words, tags parts of speech, conjugates verbs and inflects nouns, and reads dates through a plugin. It runs in the browser and in Node.js.](https://vulcode.com/en/opensource/contributions/compromise)

- [**Pterodactyl** PHP · 9,537 stars A free, open source game server management panel built with PHP, React and Go. Every game server runs in its own isolated Docker container.](https://vulcode.com/en/opensource/contributions/pterodactyl)

## Describe your project.

A free quote comes back within an hour during working hours.

### Rather skip the form?

Ask in the chat or write to us directly.

Open the chat

- **Email**: [hello@vulcode.com](mailto:hello@vulcode.com)
- **Phone**: [+48 576 043 920](tel:+48576043920)
- **Discord**: [discord.gg/vulcode](https://discord.gg/vulcode)
