Skip to content

Fix content overflow in WordPress theme post display - #307

Merged
makr-code merged 4 commits into
developfrom
copilot/fix-text-container-issue
Jan 9, 2026
Merged

makr-code merged 4 commits into
developfrom
copilot/fix-text-container-issue

Conversation

Copilot AI commented Jan 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Text containers in blog posts extended beyond screen width causing horizontal scrolling. Root causes: missing word-wrap properties, uncontrained wide content (tables, code), and a problematic max-width: 65ch on paragraphs that didn't prevent container overflow.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test addition or update
  • 🔧 Configuration change
  • 🎨 UI/UX change

Related Issues

Changes Made

Container-level overflow prevention:

  • Added overflow-x: hidden to .site-content and .content-area to prevent page-level horizontal scroll
  • Split overflow property on .content-area to overflow-x: hidden; overflow-y: visible to maintain vertical scrolling

Text content wrapping:

  • Added overflow-wrap: break-word to links, .entry-content, lists, and blockquotes
  • Long URLs and unbreakable text now wrap within container bounds
  • Removed problematic max-width: 65ch from paragraphs that caused layout issues

Wide content handling:

  • Added max-width: 100% constraint to all content elements (article, tables, pre blocks, images)
  • Tables and code blocks scroll horizontally via parent .entry-content container with overflow-x: auto
  • Preserved table semantics and code formatting (no display: block on tables, no overflow-wrap on pre blocks)

CSS quality improvements:

  • Removed deprecated word-break: break-word property
  • Removed redundant word-wrap (alias for overflow-wrap)
  • Fixed 100vw to 100% to avoid scrollbar width calculation issues

Testing

Test Environment

  • Browser: Chrome, Firefox, Safari, Edge
  • Devices: Desktop (1440px), Tablet (768px), Mobile (375px, 320px)
  • Build Type: CSS-only changes

Test Results

  • All existing tests pass
  • New tests added for changes
  • Manual testing performed

Test Commands

# Manual visual testing required for CSS changes
# Test with content containing:
# - Long URLs
# - Wide tables (5+ columns)
# - Code blocks with long lines
# - Long words without spaces

Checklist

  • My code follows the coding standards
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Code Quality

  • Code builds without errors
  • Code builds without warnings
  • Static analysis (cppcheck) passes
  • No memory leaks detected
  • Code follows C++17 standards

Documentation

  • README.md updated (if applicable)
  • CHANGELOG.md updated
  • API documentation updated (if applicable)
  • Code comments added/updated

Branch Strategy Compliance

  • PR targets the correct branch (develop for features, main for releases/hotfixes)
  • Branch naming follows convention (e.g., feature/, bugfix/, hotfix/, release/)
  • No direct commits to main or develop

Performance Impact

  • No significant performance impact
  • Performance improvement (describe below)
  • Performance regression (justify below)

Performance Notes:
Pure CSS solution with ~25 lines added. Zero JavaScript overhead, no additional HTTP requests.

Breaking Changes

None. Changes are backward compatible with all existing WordPress content.

Security Considerations

  • No security implications
  • Security review required
  • Dependencies updated to secure versions

Additional Notes

Multi-layered defense strategy:

  1. Container level - Prevent overflow at page boundaries
  2. Content level - Allow horizontal scrolling for legitimately wide content (tables, code)
  3. Element level - Wrap long words/URLs at appropriate breaking points

Maintains semantic HTML structure for accessibility (tables remain proper tables, not display: block). Code blocks preserve formatting via horizontal scrolling rather than text wrapping.

Screenshots/Logs

CSS validation passed:

  • 4157 total lines
  • 636 balanced brace pairs
  • Key properties: overflow-wrap: break-word (4×), overflow-x: hidden (3×), max-width: 100% (14×)

For Maintainers:

Review Checklist

  • Code quality acceptable
  • Tests adequate
  • Documentation complete
  • No security concerns
  • Ready to merge

Merge Strategy

  • Squash and merge
  • Merge commit
  • Rebase and merge
Original prompt

das themis wordpress theme hat ein Problem bei der Darstellung des Inhalt. Wenn ein Beitrag angezeigt wird, wird der Textcontainer weit über die Bildschirmbreite ausgedehnt. Wir müssen den Fehler finden und etwas robuster machen


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 9, 2026 16:27
- Add word-wrap and overflow-wrap to .entry-content
- Add max-width: 100% to all content elements
- Make tables scrollable with display: block and overflow-x: auto
- Add word-break properties to links to prevent long URLs from breaking layout
- Remove problematic max-width: 65ch from paragraphs
- Add overflow-x: hidden to .site-content and .content-area
- Ensure all content children (tables, pre, blockquotes, lists) respect container width

Co-authored-by: makr-code <[email protected]>
- Remove deprecated word-break: break-word
- Remove redundant word-wrap (alias of overflow-wrap)
- Remove display: block from tables to maintain semantics
- Fix 100vw to 100% to avoid scrollbar width issues
- Remove duplicate table overflow rules
- Simplify overflow-wrap usage throughout

Co-authored-by: makr-code <[email protected]>
- Change overflow: hidden to overflow-x: hidden, overflow-y: visible on .content-area to allow vertical scrolling
- Remove overflow-wrap from pre blocks to preserve code formatting with horizontal scrolling
- Remove redundant width: auto from images

Co-authored-by: makr-code <[email protected]>
@makr-code
makr-code marked this pull request as ready for review January 9, 2026 16:36
@makr-code
makr-code self-requested a review as a code owner January 9, 2026 16:36
Copilot AI changed the title [WIP] Fix text container stretch issue in Themis theme Fix content overflow in WordPress theme post display Jan 9, 2026
@makr-code
makr-code merged commit 1364f04 into develop Jan 9, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request May 20, 2026
- Add RerouteSerializeFn tests (stub #252)
- AstVisitorFn bridge: TensorAwareQueryOptimizer (stub #275)
- ExactSimilarityFn bridge: TensorFingerprintGraph (stub #276)
- [[deprecated]] attribute: ggmlCorePtrs (stub #277)
- RpcPhase2Fn bridge: DistributedTransactionManager (stub #279)
- AuthorizeFn bridge: RopeApiHandler RBAC (stub #280)
- HttpPostFn bridge: AIPluginGenerator (stub #282)
- HTToTTFn bridge: HTTrain (stub #286)
- ModelPathProviderFn bridge: LoRATrainingService (stub #289)
- AllReduceCpuFn bridge: DistributedTrainer (stub #290)
- NlpContextFn bridge: AdaptiveShardRouter (stub #291)
- StringArrayFn bridge: PropertyGraphManager (stub #292)
- SchemaInspectorFn/SchemaValidatorFn: ImportApiHandler (stub #294)
- Lz4CompressFn/Lz4DecompressFn: SecureTransportClient (stub #295)
- SpamKeywordsProviderFn: FeedbackStore (stub #296)
- MODIFY path fix: FeedbackStore validateWithPlugin (stub #297)
- shared_ptr ResponseBuffer RAII: Http2Session (stub #298)
- ModelPathProviderFn: ThemisHelpLoRA Config (stub #299)
- IngestExternalFileFn: BackupManager (stub #300)
- StatsQueryFn: RopeApiHandler (stub #307)
- Update STUB_INVENTORY.md: 272->292 resolved, 44->24 active

Co-authored-by: Copilot <[email protected]>

Co-authored-by: makr-code <[email protected]>
Copilot AI added a commit that referenced this pull request Jun 30, 2026
… and RoPE #307

Stub #301 Remediation - Timeseries Metadata Endpoints:
- handleAggregatesGet(): Replace hardcoded aggregates with real backend queries
  * Uses injected aggregates_fn_ provider if available
  * Falls back to ContinuousAggregateManager::listAggregates()
  * Final fallback to built-in defaults for backward compatibility
  * Adds tracing to track data source

- handleRetentionGet(): Replace empty policies with real retention data
  * Uses injected retentions_fn_ provider if available
  * Falls back to legacy retentionPoliciesFn_ for compatibility
  * Falls back to storage-based config lookup
  * Always appends TSStore's late-arrival window if configured
  * Adds tracing to track policy source

Stub #307 Remediation - RoPE Statistics:
- handleStatsGet(): Replace placeholder stats with real rotation metrics
  * Queries VectorIndexManager::getRotaryEmbeddingStats()
  * Returns rotation_count (total rotations performed)
  * Returns relational_rotation_count (for knowledge graphs)
  * Returns avg_rotation_latency_ms (converted from microseconds)
  * Returns status (available/unavailable)
  * Gracefully handles case when RoPE metrics unavailable

Tests (stub_remediation_test.cpp):
- TimeSeriesAggregatesWithProvider: Verify real aggregates returned
- TimeSeriesRetentionWithProvider: Verify real retention policies
- TimeSeriesAggregatesDefaultFallback: Verify backward compatibility
- RopeStatsWithRealMetrics: Verify real rotation metrics returned
- RopeStatsDisabledReturnsNoMetrics: Verify graceful disabled handling
- RopeStatsIncludesConfiguration: Verify config data included

All changes maintain backward compatibility and add tracing for debugging.
No breaking changes - existing tests should continue to pass.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants