[GH-ISSUE #8709] [Issue]: Prof. Mari's reply sprite covers the first paragraph (cssTarget safari14 emits :lang() lists Chromium drops) #8465

Closed
opened 2026-11-07 16:43:08 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8709

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In the Prof. Mari chat, the little Mari sprite beside her newest reply sits on top of the reply's first paragraph instead of in the margin to its left. The cause is in the build: cssTarget: "safari14" makes Lightning CSS rewrite logical properties into :lang(ae, ar, …) selector lists, which Chromium rejects, so the whole rule is dropped. Eight other Mari rules are lost the same way.

Expected behavior

In a wide window, she hangs in the margin left of the reply column (inset-inline-start: -3.75rem on .mari-answer__sprite, packages/client/src/styles/mari.css). In a narrow one (@container mari-scroll (width < 52rem)), she floats and the text wraps around her.

Actual behavior

In a wide window she is placed at left: 0 of the reply, covering the first lines of text. Dragging her works as designed (she springs back on release), but she springs back onto the text.

Measured in the running app (Prof. Mari window, scroll container 1221px wide): .mari-answer left = 326px, .mari-answer__sprite left = 326px, computed left: 0px.

Cause

packages/client/vite.config.ts sets build.cssTarget: "safari14". Safari 14.0 lacks inset-inline-start, so Lightning CSS (1.33.0, Vite 8.3.5's minifier) lowers it to:

.mari-answer__sprite:not(:lang(ae,ar,arc,bcc,bqi,ckb,dv,fa,glk,he,ku,mzn,nqo,pnb,ps,sd,ug,ur,yi)){left:-3.75rem}
.mari-answer__sprite:lang(ae,ar,arc,bcc,bqi,ckb,dv,fa,glk,he,ku,mzn,nqo,pnb,ps,sd,ug,ur,yi){right:-3.75rem}

Chromium does not support a comma-separated list inside :lang(). Checked in the page: document.querySelector('a:not(:lang(ae,ar))') throws, CSS.supports('selector(:lang(ae,ar))') is false, and a:lang(ar) alone is fine. So both rules are invalid and dropped, and only the unlowered part (position:absolute; top:-.6rem; bottom:0) applies.

Lightning CSS run alone on .a{position:absolute;inset-inline-start:-3.75rem}:

  • target Safari 14 → the :lang(…) pair above
  • target Safari 14.1 or none → keeps inset-inline-start:-3.75rem

Other rules lost the same way

All nine :lang(ae,ar,…) rules in the current dist/assets/client-*.css:

  • .mari-answer__sprite{left:-3.75rem}: this issue
  • .mari-list__cols>.mari-list__item:nth-child(2n)::after{left:0}
  • .mari-edit--menus>:first-child and >:first-child>.mari-row top corner radii (inherit)
  • .mari-edit--menus>:last-child and >:last-child>.mari-row bottom corner radii (inherit)
  • .mari-omnibar-header-destinations button[data-destination=chats]::before{left:calc(-.25rem - .5px)}
  • .mari-companion-resize::after{left:calc(50% - 1px)}
  • .mari-message-content .mari-md-codeblock-lang{right:0}

Possible fixes

  1. Use physical left/right (and physical corner radii) in these nine spots. This works in every browser, including Safari 14, but those spots no longer flip for right-to-left languages. I found nothing in the client that sets dir="rtl".
  2. Raise cssTarget so Lightning CSS stops lowering logical properties. inset-inline-* needs Safari 14.1, and logical corner radii (border-start-start-radius etc.) need Safari 15. This drops older iOS devices, so it's a maintainer call.

Whichever is chosen, a check that fails the build when the built CSS contains :lang( with a comma list would stop this coming back.

Steps to reproduce

  1. Build the client (cssTarget: "safari14") and open the app in a Chromium browser (Chrome, Edge, or the Windows app shell).
  2. Open Prof. Mari in a window wider than about 52rem and look at a finished reply where she rests beside the text.
  3. She covers the start of the first paragraph. Drag her, let go, and she springs back onto the text.

Environment

  • Marinara Engine version: 2.5.1 (staging at 34ad07a3b)
  • Install type: installer (repo at %LOCALAPPDATA%\MarinaraEngine)
  • OS + version: Windows 11 Pro 10.0.26200
  • Browser or app shell: reproduced in Chromium 156

Logs, screenshots, or video

No console errors. Invalid selectors are dropped without a warning.

Additional context

Image

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8709 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In the Prof. Mari chat, the little Mari sprite beside her newest reply sits on top of the reply's first paragraph instead of in the margin to its left. The cause is in the build: `cssTarget: "safari14"` makes Lightning CSS rewrite logical properties into `:lang(ae, ar, …)` selector lists, which Chromium rejects, so the whole rule is dropped. Eight other Mari rules are lost the same way. ## Expected behavior In a wide window, she hangs in the margin left of the reply column (`inset-inline-start: -3.75rem` on `.mari-answer__sprite`, `packages/client/src/styles/mari.css`). In a narrow one (`@container mari-scroll (width < 52rem)`), she floats and the text wraps around her. ## Actual behavior In a wide window she is placed at `left: 0` of the reply, covering the first lines of text. Dragging her works as designed (she springs back on release), but she springs back onto the text. Measured in the running app (Prof. Mari window, scroll container 1221px wide): `.mari-answer` left = 326px, `.mari-answer__sprite` left = 326px, computed `left: 0px`. ## Cause `packages/client/vite.config.ts` sets `build.cssTarget: "safari14"`. Safari 14.0 lacks `inset-inline-start`, so Lightning CSS (1.33.0, Vite 8.3.5's minifier) lowers it to: ```css .mari-answer__sprite:not(:lang(ae,ar,arc,bcc,bqi,ckb,dv,fa,glk,he,ku,mzn,nqo,pnb,ps,sd,ug,ur,yi)){left:-3.75rem} .mari-answer__sprite:lang(ae,ar,arc,bcc,bqi,ckb,dv,fa,glk,he,ku,mzn,nqo,pnb,ps,sd,ug,ur,yi){right:-3.75rem} ``` Chromium does not support a comma-separated list inside `:lang()`. Checked in the page: `document.querySelector('a:not(:lang(ae,ar))')` throws, `CSS.supports('selector(:lang(ae,ar))')` is `false`, and `a:lang(ar)` alone is fine. So both rules are invalid and dropped, and only the unlowered part (`position:absolute; top:-.6rem; bottom:0`) applies. Lightning CSS run alone on `.a{position:absolute;inset-inline-start:-3.75rem}`: - target Safari 14 → the `:lang(…)` pair above - target Safari 14.1 or none → keeps `inset-inline-start:-3.75rem` ## Other rules lost the same way All nine `:lang(ae,ar,…)` rules in the current `dist/assets/client-*.css`: - `.mari-answer__sprite{left:-3.75rem}`: this issue - `.mari-list__cols>.mari-list__item:nth-child(2n)::after{left:0}` - `.mari-edit--menus>:first-child` and `>:first-child>.mari-row` top corner radii (`inherit`) - `.mari-edit--menus>:last-child` and `>:last-child>.mari-row` bottom corner radii (`inherit`) - `.mari-omnibar-header-destinations button[data-destination=chats]::before{left:calc(-.25rem - .5px)}` - `.mari-companion-resize::after{left:calc(50% - 1px)}` - `.mari-message-content .mari-md-codeblock-lang{right:0}` ## Possible fixes 1. Use physical `left`/`right` (and physical corner radii) in these nine spots. This works in every browser, including Safari 14, but those spots no longer flip for right-to-left languages. I found nothing in the client that sets `dir="rtl"`. 2. Raise `cssTarget` so Lightning CSS stops lowering logical properties. `inset-inline-*` needs Safari 14.1, and logical corner radii (`border-start-start-radius` etc.) need Safari 15. This drops older iOS devices, so it's a maintainer call. Whichever is chosen, a check that fails the build when the built CSS contains `:lang(` with a comma list would stop this coming back. ## Steps to reproduce 1. Build the client (`cssTarget: "safari14"`) and open the app in a Chromium browser (Chrome, Edge, or the Windows app shell). 2. Open Prof. Mari in a window wider than about 52rem and look at a finished reply where she rests beside the text. 3. She covers the start of the first paragraph. Drag her, let go, and she springs back onto the text. ## Environment - Marinara Engine version: 2.5.1 (`staging` at 34ad07a3b) - Install type: installer (repo at `%LOCALAPPDATA%\MarinaraEngine`) - OS + version: Windows 11 Pro 10.0.26200 - Browser or app shell: reproduced in Chromium 156 ## Logs, screenshots, or video No console errors. Invalid selectors are dropped without a warning. ## Additional context <img width="1235" height="814" alt="Image" src="https://github.com/user-attachments/assets/724448d6-b66c-447d-af51-bda8d27501c6" /> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:43:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8465
No description provided.