#2180·PhotoSwipe

Modernize RGBA color syntax to prevent SASS precision loss

Author: frankl7800Created May 15, 2026Updated May 15, 2026

Problem

When SASS processes the legacy comma-separated RGBA syntax, it converts the values causing unintended precision changes:

  • rgba(0, 0, 0, 0.5) becomes rgba(0, 0, 0, 0.5019607843)
  • rgba(79, 79, 79, 0.4) becomes rgba(79, 79, 79, 0.4019607843)

Solution

Update all RGBA color declarations to use the modern space-separated syntax with slash notation:

Old syntax (problematic):

css
rgba(79, 79, 79, 0.4);
rgba(255, 255, 255, 0.9);
rgba(0, 0, 0, 0);