Page MenuHomePhabricator

client-side CSS appears to be using Less syntax, which breaks in web browsers
Closed, ResolvedPublicBUG REPORT

Description

Line 146 of ./resources/lib/ooui/oojs-ui-core-wikimediaui.css

background-color: rgba(0, 24, 73, 7/255);

This is not CSS. It looks like Less, and it is being delivered client-side for web browsers to process, and it doesn't render correctly. This is not the only CSS/Less issue, but is one of the first I stumbled upon yesterday while working on trying to fix something else.

sibling task

Event Timeline

Also noting from my mention of this yesterday on IRC in Libera.chat/Mediawiki,

same issue with line 155:

background-color: rgba(0, 36, 73, 21/255);

Another error on line 1399 (1400 too?):

background-position: -9999em 0\9;
padding: 0\9;

@Reedy pointed out https://github.com/wikimedia/mediawiki/commit/c3dc0a2d99ed6bb594dec7cd5095085028696588 which shows commits by @Volker_E and that it looks like it wasn't done on purpose. @Izno also guessed "that Volker just plain forgot that a css file isn't less" haha

In any case, I'm posting this so that it can be resolved/fixed, because I stumbled upon these issues after Libera.chat/CSS pointed out tons of W3C CSS validation and HTML validation errors on my MediaWiki website, and I am determined to fix all of them! even though they appear to all be from MediaWiki, skins and extensions.

Also continuing from where I last left off in The W3C CSS Validation Service results:

Property pointer-events doesn't exist : none

Actually, nevermind about this because apparently W3C-CSS Validation is outdated:

https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events

https://caniuse.com/pointer-events

I thought this problem and the one mentioned in T300437 have the same base reason because they have appeared at the same time and mentioned exactly the same code rgba(0,24,73,7/255), but I see the button on the demo page linked in T300437 behaving well, so probably they are separate, so I will unmark it as duplicate.

This task affects at least the hover behavior of frameless buttons – they don't have a light gray background when they are hovered.

@Jack_who_built_the_house That's correct, with the next WikimediaUI Base release for the next OOUI release this will be taken care of.

Change 854877 had a related patch set uploaded (by VolkerE; author: VolkerE):

[oojs/ui@master] build: Update 'wikimedia-ui-base' to latest v0.20.0

https://gerrit.wikimedia.org/r/854877

Change 854877 merged by jenkins-bot:

[oojs/ui@master] build: Update 'wikimedia-ui-base' to latest v0.20.0

https://gerrit.wikimedia.org/r/854877

Volker_E triaged this task as Medium priority.Nov 12 2022, 1:30 AM
Volker_E raised the priority of this task from Medium to Needs Triage.
Volker_E moved this task from Backlog to OOUI-0.46.0 on the OOUI board.
Volker_E edited projects, added: OOUI (OOUI-0.46.0); removed: OOUI.

Change 865677 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Update OOUI to v0.46.0

https://gerrit.wikimedia.org/r/865677

Change 865677 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.46.0

https://gerrit.wikimedia.org/r/865677

Change 882101 had a related patch set uploaded (by Func; author: VolkerE):

[oojs/ui@v0.44] build: Update 'wikimedia-ui-base' to v0.20.0

https://gerrit.wikimedia.org/r/882101

I think the patch should be backported to 1.39, so I cherry-picked it to the v0.44 branch of ooui.

This was fixed in OOUI's v0.46.2 release (e.g. https://gerrit.wikimedia.org/r/c/mediawiki/core/+/880992/1/resources/lib/ooui/oojs-ui-widgets-wikimediaui.css for the particular line you noticed).

I am curious about the situation though:

So, somehow wikimedia-ui-base.less was not updated in the MediaWiki core for 2 previous OOUI updates?
It was bumped to 20.0 by commit a222a13 which contains the fix (3e13426), and then we have cd023d2 and e1d7d17 in the ooui side, f8a7e46 and fc0acab3 in the core.
What's the process of upgrading ooui in the core? manually? without CI checking?

Change 882101 merged by jenkins-bot:

[oojs/ui@v0.44] build: Update 'wikimedia-ui-base' to v0.20.0

https://gerrit.wikimedia.org/r/882101

Change 886956 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@REL1_39] Update OOUI to v0.44.5

https://gerrit.wikimedia.org/r/886956

Change 886956 merged by jenkins-bot:

[mediawiki/core@REL1_39] Update OOUI to v0.44.5

https://gerrit.wikimedia.org/r/886956

Volker_E renamed this task from client-side CSS appears to be using LESS syntax, which breaks in web browsers to client-side CSS appears to be using Less syntax, which breaks in web browsers .May 17 2023, 4:59 PM
Volker_E closed this task as Resolved.
Volker_E claimed this task.
Volker_E updated the task description. (Show Details)