Repository navigation
fix: light the comments "Displaying N comments" line in dark mode - #76
Merged
Merged
Conversation
ActiveAdmin's base _pagination.scss closes with a .comments block that
re-colours the pagination info to #000:
.comments {
.pagination_information { float: left; color: #000; }
}
Two classes outweigh the theme's single-class `.pagination_information`,
so on a show page's comments panel the plain text of "Displaying 1
comment" stayed black on the dark surface. Only the count read, because
the <b> inside it matches `.pagination_information b` — same specificity
as the base rule, theme loaded later, theme wins.
Add a `.comments .pagination_information` selector of equal specificity;
the theme is imported after AA base, so source order decides it.
Measured in test/dummy with dark mode forced: the line computes to
rgb(0, 0, 0) before and rgb(221, 226, 232) after, against the panel's
rgb(37, 41, 47). `rake css` passes.
Merged
Member
Author
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
ActiveAdmin's base
_pagination.scssends with a.commentsblock thatre-colours the pagination info line:
Two classes outweigh the theme's single-class
.pagination_information, so ona show page's comments panel the plain text of "Displaying 1 comment" stayed
black on the dark surface. Only the count read, because the
<b>inside itmatches
.pagination_information b— same specificity as the base rule, andthe theme is loaded later, so the theme wins there.
Fix
Add a
.comments .pagination_informationselector of equal specificity to thebase one; the theme is imported after AA base, so source order decides it.
Measured
test/dummywith dark mode forced, computedcolorof the line:.pagination_information<b>rgb(0, 0, 0)rgb(221, 226, 232)rgb(37, 41, 47)rgb(221, 226, 232)rgb(221, 226, 232)rgb(37, 41, 47)rake csspasses.