diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b45a89..31da430 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ 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.2] — 2026-04-20 + +### Fixed +- **Bullet points missing in articles.** Theme's global CSS reset strips + `list-style` from all `ul`/`ol`. Typography CSS now restores disc/decimal + bullets with proper padding inside `.entry-content`. +- **Tables break on mobile.** Tables now wrapped in a horizontally + scrollable container (`prab-table-wrap`) via `the_content` filter. + Added responsive media query for tighter padding and smaller font at + narrow viewports. + ## [0.7.1] — 2026-04-20 ### Fixed diff --git a/includes/class-prautoblogger.php b/includes/class-prautoblogger.php index 50774f0..8a9a98a 100644 --- a/includes/class-prautoblogger.php +++ b/includes/class-prautoblogger.php @@ -92,6 +92,7 @@ class PRAutoBlogger { $typography = new PRAutoBlogger_Article_Typography(); add_action( 'wp_head', [ $typography, 'on_wp_head' ] ); add_action( 'wp_enqueue_scripts', [ $typography, 'on_enqueue_fonts' ] ); + add_filter( 'the_content', [ $typography, 'on_wrap_tables' ], 99 ); } /** Register cron-triggered hooks for scheduled generation and metrics. */ diff --git a/includes/frontend/class-article-typography.php b/includes/frontend/class-article-typography.php index a12282e..a6667d1 100644 --- a/includes/frontend/class-article-typography.php +++ b/includes/frontend/class-article-typography.php @@ -81,13 +81,38 @@ class PRAutoBlogger_Article_Typography { ); } + // Restore bullet points — the theme's global reset strips + // list-style from all ul/ol, which removes bullets from article + // content. This re-applies them inside .entry-content only. + $rules[] = implode( "\n", [ + '.entry-content ul {', + "\tlist-style: disc;", + "\tpadding-left: 1.5em;", + "\tmargin: 1em 0;", + '}', + '.entry-content ol {', + "\tlist-style: decimal;", + "\tpadding-left: 1.5em;", + "\tmargin: 1em 0;", + '}', + '.entry-content li {', + "\tmargin-bottom: 0.4em;", + '}', + ] ); + $table_borders = get_option( self::OPT_TABLE_BORDERS, '1' ); if ( '1' === $table_borders ) { $rules[] = implode( "\n", [ + // Wrapper for horizontal scroll on narrow viewports. + '.entry-content .prab-table-wrap {', + "\toverflow-x: auto;", + "\t-webkit-overflow-scrolling: touch;", + "\tmargin: 1.5em 0;", + '}', '.entry-content table {', "\tborder-collapse: collapse;", "\twidth: 100%;", - "\tmargin: 1.5em 0;", + "\tmin-width: 480px;", '}', '.entry-content th,', '.entry-content td {', @@ -102,6 +127,14 @@ class PRAutoBlogger_Article_Typography { '.entry-content tbody tr:nth-child(even) {', "\tbackground: #f9fafb;", '}', + // Mobile: tighter padding, smaller text for tables. + '@media (max-width: 600px) {', + "\t.entry-content th,", + "\t.entry-content td {", + "\t\tpadding: 0.4em 0.6em;", + "\t\tfont-size: 14px;", + "\t}", + '}', ] ); } @@ -183,4 +216,39 @@ class PRAutoBlogger_Article_Typography { ); } } + + /** + * Wrap bare