<p></p>
<p dir="auto">I found this while working on another topic. The algorithm used by the <a href="https://github.com/mzsanford/R2rb">r2 gem</a> is different from that generated by the <a href="https://github.com/ded/R2">upstream nodejs r2</a> project, and the ruby version doesn't handle <code class="notranslate">!important</code> declarations. This leads it to generate invalid CSS.</p>
<div class="highlight highlight-source-ruby" dir="auto"><pre class="notranslate"><span class="pl-c1">R2</span><span class="pl-kos">.</span><span class="pl-en">r2</span><span class="pl-kos">(</span><span class="pl-s">"div { border-radius: 2 !important}"</span><span class="pl-kos">)</span>
<span class="pl-c1">=></span> <span class="pl-s">"div{border-radius:!important 2;}"</span></pre></div>
<p dir="auto">This means that currently, some CSS is not working properly on our site. For example, in RTL languages the corners of the location-picking map are not properly rounded:</p>
<h1 dir="auto">LTR (rounded)</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/360803/253027037-94117132-2be0-4ff4-b2f9-fa877770c846.png"><img src="https://user-images.githubusercontent.com/360803/253027037-94117132-2be0-4ff4-b2f9-fa877770c846.png" alt="Screenshot from 2023-07-12 16-40-33" style="max-width: 100%;"></a></p>
<h1 dir="auto">RTL (not rounded due to invalid CSS)</h1>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/360803/253027044-578cb271-2dff-473c-9476-88e7c57d6dd8.png"><img src="https://user-images.githubusercontent.com/360803/253027044-578cb271-2dff-473c-9476-88e7c57d6dd8.png" alt="Screenshot from 2023-07-12 16-40-11" style="max-width: 100%;"></a></p>
<p dir="auto">I know it's a pretty minor thing, but I haven't audited the rest of the generated CSS to see what else might be broken.</p>
<p dir="auto">See also:</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1801293611" data-permission-text="Title is private" data-url="https://github.com/mzsanford/R2rb/issues/18" data-hovercard-type="issue" data-hovercard-url="/mzsanford/R2rb/issues/18/hovercard" href="https://github.com/mzsanford/R2rb/issues/18">mzsanford/R2rb#18</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1109350375" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3433" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/openstreetmap-website/issues/3433/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/issues/3433">#3433</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/4087">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLY36OUWWPXPVBFZJDXP3CSZANCNFSM6AAAAAA2HWMTWE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMH4UFEI7FXOOCZKO3XP3CSZA5CNFSM6AAAAAA2HWMTWGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGWXM4IQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/4087</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/4087",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/4087",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>