[pull] main from TryGhost:main - #1452
Merged
Merged
Conversation
ref https://linear.app/ghost/issue/DES-1419/when-picking-an-image-from-unsplash-the-whole-background-is-white-even The Unsplash picker stayed white in dark mode. Two separate implementations sit behind it, and both were broken for different reasons. The React selector (settings, tags, the editor's Unsplash card) had no dark styles at all. Its chrome used `bg-white` and `text-black`, which are fixed values in both Shade and Koenig. It now uses Shade's semantic tokens, which read variables that Shade redefines under `.dark`, so they flip on their own. The Ember picker (tag image, the editor's feature image) was broken by a class-name collision. Spirit's `.bg-white` flips to a dark value, but Shade emits a Tailwind utility of the same name that is hard-coded white. Both have the same specificity and Shade's stylesheet loads later, so Shade won. `gh-unsplash.hbs` was the only template in the Ember admin still using `bg-white`, which is why this was the only place it showed. It now uses its own class that reads the Spirit variable directly. Two supporting changes: - Koenig now scans kg-unsplash-selector and defines the same tokens. The package ships no usable CSS of its own, so whichever host renders it compiles its classes. Admin already scanned it. Koenig only worked because the classes happened to overlap with its own components. - The component sets font sizes explicitly instead of using `text-sm` and friends. Koenig and Shade disagree on every step of that scale, so the same class rendered a different size in the editor than in settings. The rest lines the two pickers up visually: search field padding and font, icon size and colour, author avatar. The buttons on a photo stay light in both themes on purpose, since they sit on the image rather than on the modal.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )