<p></p>
<p><b>@eht16</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2930#discussion_r735100437">src/highlightingmappings.h</a>:</p>
<pre style='color:#555'>> @@ -388,7 +388,12 @@ static const HLStyle highlighting_styles_CSS[] =
        { SCE_CSS_EXTENDED_IDENTIFIER,          "extended_identifier",                FALSE },
        { SCE_CSS_EXTENDED_PSEUDOCLASS,         "extended_pseudoclass",               FALSE },
        { SCE_CSS_EXTENDED_PSEUDOELEMENT,       "extended_pseudoelement",     FALSE },
-       { SCE_CSS_MEDIA,                                        "media",                                      FALSE }
+       { SCE_CSS_GROUP_RULE,                           "group_rule",                         FALSE },
+       /* In Geany 1.38 and earlier shipped filetypes.css with "media" identifier,
+        * Scintilla/Lexilla 5.1.2 has renamed this style and extended its meaning.
+        * We still recognize media for compatibility.
+        */
+       { SCE_CSS_GROUP_RULE,                           "media",                                      FALSE }
</pre>
<p>Good idea. Though it doesn't work, easy to find out by just testing it:<br>
the "media" item overwrites the previous "group_rule" item, regardless whether "group_rule" appears in the fletype configuration or not.</p>
<p>So, we have a couple of options here:</p>
<ol>
<li>keep the name "media" even though it doesn't matter the Scintilla style name anymore. Maybe add a comment in <code>data/filedefs/filetypes.css</code> to the "media" style to document it's also used for the other CSS groups</li>
<li>rename the style to "group_rule" and tell the users in the release notes about the renamed style, some users probably won't notice it anyway and might be wondering about broken styling</li>
<li>add some code which actually can handle such duplicate comparability style items</li>
<li>add some code to support something like</li>
</ol>
<pre><code>group_rule=0xffffff;0x0000ff;true;false
media=group_rule
</code></pre>
<p>in filetype definition files, currently style references seem to work only for global styles but not for those defined in the same file.</p>
<p>I think 4. would be the best and most flexible solution but also with the most effort. And of course, 3. and 4. would be totally out of scope of this PR.</p>
<p>So maybe 1. would be good enough? If such renamings happen more often in the future, we might reconsider the other options, I think.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2930#discussion_r735100437">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5MFSEX3FPJFJVE3UDUIPRFDANCNFSM5FYCAC7Q">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ6S6AFZ7A4MM53IX63UIPRFDA5CNFSM5FYCAC72YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF3YEBKA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2930#discussion_r735100437",
"url": "https://github.com/geany/geany/pull/2930#discussion_r735100437",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>