Style the YOURLS 1.10 delete-confirmation dialog#154
Open
toineenzo wants to merge 4 commits into
Open
Conversation
YOURLS 1.10 dropped the old jquery-notify-bar delete confirmation in favour of a native <dialog id="delete-confirm-dialog"> with hard-coded white/blue chrome (background #ffffff, header #c7e7ff, border #2a85b3). On the Sleeky surface that pops up as a bright white card with light blue borders that completely ignores the active theme. Re-skin it to use the existing $default / $light / $accent / $title / $text / $lightest theme variables so it picks up the dark or light palette automatically: - Dialog body uses $default with a $accent border and a heavier shadow. - Header (div[name="dialog_title"]) sits on $light with $title text and a $accent bottom border. - Message body keeps the dialog background; the inner <ul> keeps its accent left border but the <span> values now sit on $light with a $lightest border so they read as cards instead of light-blue tags. - Button group uses the $light footer band the existing input.button / input[type="submit"] rules already render correctly on. The cancel button (last input[type=submit] in the group) gets a muted left border so it doesn't look identical to the destructive Delete one. - ::backdrop dimmed to a uniform rgba(0,0,0,0.7). Light theme keeps the rounded corners (6px) for parity with the rest of Sleeky-light; dark theme stays flat to match the existing flat aesthetic. Both compiled themes (dark.css, light.css) regenerated with `sass --no-source-map --style=compressed` from the corresponding source files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reported on a live YOURLS install with Sleeky-backend dark theme: the
re-skinned #delete-confirm-dialog rendered with the body content at the
top but the dialog box itself stretching from y=0 to y=100vh.
Cause: the previous patch set `height: auto` on the dialog. With
Sleeky's `body { display: inline }` the auto value resolved to the
viewport height instead of fitting the children.
Fix:
- height: fit-content + max-height: 90vh -- explicitly tells the
browser to size the dialog to its actual contents and never grow
past 90% of the viewport.
- inset: 0 + margin: auto -- pin the showModal()-positioned dialog
back to the viewport center so it doesn't drift after the size
change.
- overflow: hidden -- clip the rounded-corner border consistently.
Both compiled themes (dark.css, light.css) regenerated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
YOURLS 1.10 replaced the old
jquery-notify-bardelete confirmation with a native<dialog id="delete-confirm-dialog">and shipped it with a hard-coded white/blue palette (background#ffffff, header#c7e7ff, border#2a85b3). On Sleeky-backend that pops up as a bright white card with light-blue borders dropped right on top of the dark surface — completely ignoring the active theme.Fix
Re-skin
#delete-confirm-dialogand its children using the existing theme variables ($default/$light/$accent/$title/$text/$lightest) so it picks up the dark or light palette automatically.$defaultbackground,$accentborder, heavier drop shadowdiv[name="dialog_title"])$lightband with$titletext and$accentbottom rule<ul>keeps its$accentleft border but the<span>value chips now sit on$lightwith a$lightestborder so they read as cards instead of light-blue tags$lightfooter band the existinginput.button/input[type="submit"]rules already render correctly on; the cancel button (lastinput[type="submit"]in the group) gets a muted left border so it isn't visually identical to the destructive Delete::backdroprgba(0, 0, 0, 0.7)height: fit-content+max-height: 90vh+ explicitinset: 0; margin: autoso the dialog fits its content and stays centered (height: autowas being resolved againstbody { display: inline }and stretching to 100vh on Sleeky)Light theme keeps the rounded corners (6px) for parity with the rest of Sleeky-light; dark theme stays flat to match the existing flat aesthetic.
Files touched
sleeky-backend/assets/css/_base.scss#delete-confirm-dialogblock (~100 lines, gated on$themefor the corner-radius difference)sleeky-backend/assets/css/dark.csssleeky-backend/assets/css/light.cssBoth compiled CSS files regenerated with the same Sass invocation as
npm startinpackage.json, just driven by Dart Sass instead of the deprecatednode-sass:How to test
/admin/index.php.Verified on YOURLS 1.10.3 + PHP 8.4 with Sleeky-backend's dark theme on a live install.