import re
with open('current_about_post.html', 'r', encoding='utf-8') as f:
content = f.read()
robust_reset = """/* Super Aggressive Layout Reset for Full Width */
body.page-id-48 .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
max-width: none !important;
}
body.page-id-48 .wp-site-blocks,
body.page-id-48 main,
body.page-id-48 .entry-content,
body.page-id-48 .wp-block-post-content {
max-width: none !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
body.page-id-48 .about-page {
max-width: none !important;
width: 100% !important;
}
"""
if "Super Aggressive Layout Reset for Full Width" not in content:
content = content.replace("/* Reset and Core for About Page */", robust_reset + "\n/* Reset and Core for About Page */")
with open('current_about_post.html', 'w', encoding='utf-8') as f:
f.write(content)