Hi Viktoria and all,
some more insights on the background behind recent changes around this.
Direct change was done in T265650 [0] that led to this specific Less
compiler issue. We have to be strict about preprocessor functions in
order to catch unintended rendering glitches based on too loose
calculations.

Additionally we're currently rolling out the next major version of
Codex design system to support font modes more generally (as currently
featured by Vector skin). A small number of design token categories
will now carry CSS custom properties and not raw values anymore. This
might lead to similar Less compiler errors. In order to rely on basic
calculations with them you have to rely on CSS as well, with its
`calc()` function. That's future-facing, a good idea anyway for
flexibility and code predictions.
The Design System Team [1] has taken a lot of care to not break things
downstream with its rollout of 2.0 coming this week.
But I want to take this opportunity to call out once more to make sure
that your skins/extensions –in case they rely on Codex design tokens
and are using preprocessor (Less, Sass) functions like simple
calculations or `unit()`– are revisited and amended if needed.
See Codex/Release_Timeline/2.0/Breaking_changes [2] for the token
categories affected.

Best regards,
Volker

[0] https://phabricator.wikimedia.org/T265650
[1] https://www.mediawiki.org/wiki/Design_System_Team
[2] https://www.mediawiki.org/wiki/Codex/Release_Timeline/2.0/Breaking_changes




On Tue, Apr 29, 2025 at 4:53 AM Viktoria Hillerud
<viktoria.hille...@wikimedia.se> wrote:
>
> Thankyou so much, that helped!
> Much appreciated!
>
> Viktoria Hillerud
> Developer
> Wikimedia Sverige (WMSE)
>
>
>
> Den tis 29 apr. 2025 kl 13:49 skrev Marcin Szwarc <marcinszw...@hotmail.com>:
>>
>> Hi,
>>
>> Have you pulled the recent commits in skins/ folder? (These are separate 
>> repositories)
>>
>> I've had the same error recently and as far as I remember, updating skins 
>> (particularly Vector) was the solution.
>>
>> Regards,
>> Marcin
>> Msz2001
>> ________________________________
>> From: Viktoria Hillerud <viktoria.hille...@wikimedia.se>
>> Sent: Tuesday, April 29, 2025 1:43:43 PM
>> To: wikitech-l@lists.wikimedia.org <wikitech-l@lists.wikimedia.org>
>> Subject: [Wikitech-l] LessExceptionCompiler error
>>
>> After pulling down the latest changes from MW core, I got some error with my 
>> css/less not loading on the page.
>> The issue looks like this:
>>
>> Less_Exception_Compiler: error evaluating function `unit` The first argument 
>> to unit must be a number. Have you forgotten parenthesis? index: 69 in 
>> stickyHeader.less on line 2, column 1
>> 1| @spacing-search-title-divider: 30px;
>> 2| @font-size-sticky-header-links: unit( 14 / @font-size-browser, em ); // 
>> Equals `0.875em`.
>> 3| @import '../skins.vector.styles/variables.less';
>> 4|
>> 5| .vector-sticky-header-container {
>> 6|     position: fixed;
>>
>>
>> I have already run composer update and the relevant maintenance scripts 
>> (update.php, etc.), but the issue persists.
>>
>> These are the versions I'm using (same as my colleague, for whom it works 
>> fine):
>> MediaWiki    1.44.0-alpha (4c93914) 07:06, 28 April 2025
>> PHP    8.3.14 (fpm-fcgi)
>> ICU    72.1
>> MariaDB    11.4.4-MariaDB
>>
>>
>> Any ideas on what could be happening?
>>
>> Viktoria Hillerud
>> Developer
>> Wikimedia Sverige (WMSE)
>>
>> _______________________________________________
>> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
>> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
>> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to