discourse/app/assets/stylesheets
Osama Sayegh eff6e4b405
FIX: Position Float Kit elements correctly in RTL mode (#24908)
Float-kit elements (menus/tooltips) are positioned where they should be by setting an inline `left` property in JavaScript when they're rendered. For some reasons, we also set `left: 0` on float-kit elements here:

25d9927785/app/assets/stylesheets/common/float-kit/d-menu.scss (L11-L15)

This property is overridden by the inline property that the library sets in JavaScript. However, in RTL mode, all of our scss files are flipped where everything left becomes right and vice versa. In this case, the `left: 0` property in the scss file above becomes `right: 0`.

This results in a conflict specific to RTL mode where both the `left` and `right` properties are defined on the same absolute-positioned element; the `right` property will always be set to 0 because it comes from the (flipped) scss file above, and the inline `left` property will be set to some px amount determined in JavaScript.

The `right` property will take precedence over the inline `left` property due to the page being right-to-left (source: https://developer.mozilla.org/en-US/docs/Web/CSS/right#description) and this causes float-kit elements to incorrectly always stick to the right.

This commit removes the `left: 0` property altogether for float-kit elements from our scss files. It's not clear from git history why the property was added, and removing it doesn't seem to cause any issues.

Meta topic: https://meta.discourse.org/t/positioning-issues-with-rtl-locales-after-recent-updates/280220?u=osama
2023-12-15 13:16:31 +03:00
..
common FIX: Position Float Kit elements correctly in RTL mode (#24908) 2023-12-15 13:16:31 +03:00
desktop DEV: Render glimmer notification items for user notification list (#24802) 2023-12-11 11:04:43 -06:00
mobile DEV: Render glimmer notification items for user notification list (#24802) 2023-12-11 11:04:43 -06:00
vendor DEV: FloatKit (#23650) 2023-09-26 13:39:52 +02:00
admin_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
admin.scss Sane sendAction() behavior 2015-09-11 09:34:20 -07:00
color_definitions.scss DEV: FloatKit (#23650) 2023-09-26 13:39:52 +02:00
common.scss DEV: Port discourse-table-builder theme component to core (#24441) 2023-11-30 10:54:29 -08:00
desktop_rtl.scss FEATURE: support user local switching to RTL correctly 2015-05-20 15:56:54 +10:00
desktop.scss DEV: Added support for custom site setting 'emoji_list' (#12414) 2021-04-07 15:32:05 +02:00
embed.scss FIX: Broken hashtags on embed and publish pages (#24210) 2023-11-02 11:43:55 +10:00
ember_cli.scss DEV: Require Ember CLI to be used in development mode (#12738) 2021-04-29 14:13:36 -04:00
mobile_rtl.scss FEATURE: support user local switching to RTL correctly 2015-05-20 15:56:54 +10:00
mobile.scss DEV: Refactor font and category background importers (#12312) 2021-03-10 11:05:56 -05:00
publish.scss FIX: Broken hashtags on embed and publish pages (#24210) 2023-11-02 11:43:55 +10:00
qunit-custom.scss DEV: QUnit CSS tweaks (#24180) 2023-10-31 14:53:42 +01:00
qunit.scss DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
wcag.scss A11Y: Improve contrast on the WCAG color schemes (#23692) 2023-09-29 10:03:08 -06:00
wizard_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
wizard.scss UX: Ensure wizard previews display at correct width (#24801) 2023-12-08 20:45:54 +00:00