Page MenuHomePhabricator

Fix inconsistent flipping of CSS variables
Open, MediumPublic

Description

@HumansCanWinElves@github.com wrote on 9 Dec 2021:

When the word "right" or "left" is used as part of the name of a custom CSS property, the name is flipped by CSSJanus when the property is assigned, but not when the property is used, those breaking it's functionality.

Example input:

body.theme-dark {
    --right-rail-bg: blue;
}

.right-rail {
    background: var(--right-rail-bg);
}

CSSJanus output:

body.theme-dark {
    --left-rail-bg: blue;
}

.right-rail {
    background: var(--right-rail-bg); /* invalid */
}

It is probably better to not change custom property names at all, but it should at least be consistent.

Event Timeline

Krinkle triaged this task as Medium priority.Mar 28 2023, 3:28 AM
Krinkle updated the task description. (Show Details)
Krinkle moved this task from Limbo to Watching on the Performance-Team (Radar) board.

Hi and thank you for your interest! Please check thoroughly https://www.mediawiki.org/wiki/New_Developers (and all of its communication section!). The page covers how to get started, assigning tasks, task status, how to find a codebase, how to create patches, where to ask general development questions and where to get help with setup problems, and how to ask good questions. Thanks a lot! :)