Skip to content

Fix CSS palette import

Alx Sa requested to merge alxsa-css-import-fix into master

This is an issue in both 2.99 and 2.10. If approved, it would be very easy to backport.

Currently, the regex used for CSS palette imports expects each line to end with a ";". However, GIMP exports CSS palettes without ";" ending the color: rgb() line. This means that GIMP can't reopen its own palettes.

The ";" was removed from the CSS import regex to fix the issue, as it is valid CSS2 to leave off the ";" on the last line of a block. However, CSS3 requires all lines to end with ";", so it is added to the CSS export code's output.

Edited by Alx Sa

Merge request reports