• Resolved maxlefou

    (@maxlefou)


    Dark mode is getting used more and more by browsers and CSS integration of it is kinda simple. So i’m doing it for a theme my blog is using, and my blog happens to use tablepress. But the tables i made stays white and in light colors by default (while the texts gets mysteriously in the right color in dark mode!)

    I know i can use the custom css feature in tablepress and it’s what i did gonna do, but it would be neat if tablepress natively supports dark support in the future. ??

    For those who use tablepress and needs dark mode support for them, in the mean time, you can add something like this in the custom css in the meantime:

    @media (prefers-color-scheme: dark) {
    
    	.tablepress thead th {
    		background: #336699;
    	}
    
    	.tablepress .odd td {
    		background: #4d4d4d;
    	}
    
    	.tablepress .even td {
    		background: #3a3a3a;
    	}
    
    	.tablepress tbody td,
    	.tablepress tfoot th {
    		border-top: 1px solid #666;
    	}
    
    }

    (of course change for your own needs)

    • This topic was modified 5 years, 9 months ago by maxlefou. Reason: added some temporary fix
    • This topic was modified 5 years, 9 months ago by maxlefou.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Thanks for this suggestion and for providing the code for it! I’ll definitely consider this for the future!

    Best wishes,
    Tobias

    +1 for the request of that feature as the theme I’m going to use offers the dark/night mode as well.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks! Right now, the best solution here should be to add this to the TablePress “Custom CSS” or the theme’s CSS. That way, it’s easier to adjust colors as necessary.
    Adding it to TablePress as a default won’t really work, if the rest of the theme doesn’t do it.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dark mode support’ is closed to new replies.