XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

New Tweak: Respect user's theme when in blog-view.

Open alleycatboy opened this issue 3 years ago • 0 comments

Description

This tweak is great for users with dark color pallets that wish to not have blinding light when viewing other user's blogs with lighter themes.

I got the idea from this Suggestion Box comment here on how they'd like to still see the theme while keeping posts readable.

This allows for more comfortable post viewing while still seeing the splash of flair from

Note: this is only for the posts themselves. The surrounding theme of the blog is preserved.

Additional note: this respects all the color pallets (True Blue, Goth Rave, Cybernetic, etc.)

Inquiry

Since this doesn't truly affect the dashboard, simply the blog-view, is it appropriate to be included in Tweaks? Tweaks is defined to the users as "Miscellaneous dashboard options".

Would it be more appropriate for this to be a stand-alone script?

Note: this is not the same behavior as Themed Posts, as this is the user's pallet and not the target blog's theme.

Note: this is not the same behavior as disabling "Use blog colors when viewing blogs" as mentioned here. It preserves the surrounding theme.

firefox_BU0WVMVOcm

Technical Explanation

All this does is prevent the CSS variables of the blog from overriding the user's color pallet on posts by setting the color variables to inherit !important; and appends the style to the document head.

Testing steps

Just enable "Respect the user's theme on blog pages" under Tweaks!

It should only change the theme of posts in blog-view.

alleycatboy avatar Nov 29 '22 21:11 alleycatboy