Use theme CSS variables for table colors (dark mode fix)
Hardcoded light-mode hex colors in table styles broke dark mode — header backgrounds and text were unreadable. Now uses theme CSS custom properties (--color-border-default, --color-bg-secondary, --color-text-primary) with light-mode fallbacks. Bump 0.7.2 → 0.7.3. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,14 @@ All notable changes to PRAutoBlogger will be documented in this file.
|
||||
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project uses [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.7.3] — 2026-04-20
|
||||
|
||||
### Fixed
|
||||
- **Table colors broken in dark mode.** Replaced hardcoded hex colors
|
||||
with theme CSS custom properties (`--color-border-default`,
|
||||
`--color-bg-secondary`, `--color-text-primary`) so table borders,
|
||||
header backgrounds, and text adapt to light/dark mode automatically.
|
||||
|
||||
## [0.7.2] — 2026-04-20
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -102,8 +102,10 @@ class PRAutoBlogger_Article_Typography {
|
||||
|
||||
$table_borders = get_option( self::OPT_TABLE_BORDERS, '1' );
|
||||
if ( '1' === $table_borders ) {
|
||||
// Uses theme CSS custom properties for dark mode compatibility.
|
||||
// --color-border-default, --color-bg-secondary, --color-bg-primary,
|
||||
// --color-text-primary are set by PR Theme for both light and dark.
|
||||
$rules[] = implode( "\n", [
|
||||
// Wrapper for horizontal scroll on narrow viewports.
|
||||
'.entry-content .prab-table-wrap {',
|
||||
"\toverflow-x: auto;",
|
||||
"\t-webkit-overflow-scrolling: touch;",
|
||||
@@ -116,18 +118,18 @@ class PRAutoBlogger_Article_Typography {
|
||||
'}',
|
||||
'.entry-content th,',
|
||||
'.entry-content td {',
|
||||
"\tborder: 1px solid #d1d5db;",
|
||||
"\tborder: 1px solid var(--color-border-default, #d1d5db);",
|
||||
"\tpadding: 0.6em 1em;",
|
||||
"\ttext-align: left;",
|
||||
"\tcolor: var(--color-text-primary, #111827);",
|
||||
'}',
|
||||
'.entry-content thead th {',
|
||||
"\tbackground: #f3f4f6;",
|
||||
"\tbackground: var(--color-bg-secondary, #f3f4f6);",
|
||||
"\tfont-weight: 600;",
|
||||
'}',
|
||||
'.entry-content tbody tr:nth-child(even) {',
|
||||
"\tbackground: #f9fafb;",
|
||||
"\tbackground: var(--color-bg-secondary, #f9fafb);",
|
||||
'}',
|
||||
// Mobile: tighter padding, smaller text for tables.
|
||||
'@media (max-width: 600px) {',
|
||||
"\t.entry-content th,",
|
||||
"\t.entry-content td {",
|
||||
|
||||
@@ -8,7 +8,7 @@ declare(strict_types=1);
|
||||
* Plugin Name: PRAutoBlogger
|
||||
* Plugin URI: https://peptiderepo.com/prautoblogger
|
||||
* Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics.
|
||||
* Version: 0.7.2
|
||||
* Version: 0.7.3
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 7.4
|
||||
* Author: PeptideRepo
|
||||
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
| and limits without magic strings.
|
||||
*/
|
||||
|
||||
define( 'PRAUTOBLOGGER_VERSION', '0.7.2' );
|
||||
define( 'PRAUTOBLOGGER_VERSION', '0.7.3' );
|
||||
define( 'PRAUTOBLOGGER_DB_VERSION', '1.1.0' );
|
||||
define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ );
|
||||
define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
Reference in New Issue
Block a user