-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply text-align: match-parent to the option element in the UA stylesheet #6538
Comments
Some quick investigation: currently it looks like Firefox uses @emilio will be looking into this more. |
So, ok, if I understand correctly, this is a representative example of the situation that we want to fix (live): <!DOCTYPE html>
<style>
option, p { text-align: match-parent }
select, div { text-align: end}
</style>
<select>
<option dir=rtl>abc</option>
<option>defghi</option>
</select>
<div>
<p dir=rtl>abc</p>
<p>defghi</p>
</div> So, right now Firefox uses So that's an interop issue. My understanding is that Firefox's behavior is wrong per spec right now, but it used to be right (see bug 1661548 / w3c/csswg-drafts#2821). Chromium hasn't implemented |
This issue has gone a bit further beyond my understanding, but from what I can tell the open questions in @emilio's last comment are more in CSSWG territory. Would it make sense to open an issue for the CSSWG telecons? Or is there a clear next step here on the HTML spec side / implementation bug-filing side? |
@domenic Afaict, the issue is on the implementation / HTML spec side. What I'm seeing:
|
That can be explained. Do you file a bug for this? Popups have limited styling capabilities (partly for implementation reasons, partly for compat). Should be easy to fix on desktop: https://searchfox.org/mozilla-central/rev/292d17c13daa61016fd082e2337297091d53a015/toolkit/actors/SelectParent.jsm#29 However on Android we use native menus (and I think that's what Safari uses on macOS), so not sure it can easily be fixed there. |
The CSS text 3 spec suggests a UA stylesheet for the option element:
This probably should be normatively defined in the HTML spec instead.
This 'match-parent' value makes the desired alignment consistent in bidi situations.
The text was updated successfully, but these errors were encountered: