Computer
Fix Dark and Light Theme Issues

Good context. GeneratePress is active and GP Premium is installed. GeneratePress ships an "Additional CSS" module through the Customizer (wp_get_custom_css_post → post type custom_css). Let me try to fetch that as a post via the content API — post types are pluggable.


208461344
This is scoped to post type only. The MCP surface doesn't give me a path to Additional CSS. I need to be honest with you and pause before pushing anything the wrong way.

Here's the situation:

What I found
Your sidebar ads are Automattic house/network ads rendered by wpa/wpa-about blocks (widget IDs block-395, block-398, block-400, and three more) — six 300×250 slots stacked in #right-sidebar. They have no inline background or border, so in dark mode they show as bright white rectangles floating on your dark surroundings (that's the "theme issue"). In light mode they blend in but look flat.

The blocker on "push directly via WordPress"
The WordPress connector exposes site settings, plugins, templates, global styles, menus, and posts — but it does not expose the classic Customizer's Additional CSS or theme_mods. GeneratePress stores your custom CSS there, and there's no MCP endpoint to write to it. I can't push CSS live from here without one of these paths:

Easiest — you paste it (30 seconds). I give you the exact CSS. You go to Appearance → Customize → Additional CSS, paste, publish. Done. This is what I recommend.

Install a "Simple Custom CSS" plugin via MCP. I can install and activate one, then write CSS into its option — but that adds a plugin dependency you don't need, and it may still not expose a write endpoint I can reach.

Edit the GeneratePress child theme's style.css. I don't see a child theme, and MCP has no file-editor for the parent theme.

Two ad slots + longer format. The "make ads longer" part is a widget change — I'd need to remove 4 of the 6 wpa blocks and reconfigure the remaining ones to be 300×600 half-page units. Automattic's wpa blocks are fixed 300×250 though, so "longer" would actually mean either replacing them with a different ad format or restyling them into taller framed containers (visual only, not more ad inventory).

Also worth flagging
Those wpa-about ads are the Automattic house-ad fallback that shows when Jetpack's WordAds isn't earning fills — they don't pay you. If revenue matters, that's a separate conversation.

My recommendation
Let me give you the exact CSS to paste — it takes 30 seconds and I can verify the result with a screenshot right after. Want me to:

(A) Write the CSS now (theme-aware ad frames + taller 300×600 containers with a "Advertisement" label, works with your existing body.dark-mode toggle), or

(B) Try installing a Custom CSS plugin via MCP and see if I can reach its option programmatically, or

(C) Something else — e.g., you actually want to replace those Automattic ads with AdSense/other units and I should design around that?

Write the CSS now for theme-aware ad frames and taller sidebar containers

Here's the CSS. Paste it into Appearance → Customize → Additional CSS on msftnewsnow.com and hit Publish.

What it does
Frames each sidebar ad with a card (border, subtle shadow, rounded corners) that swaps colors automatically via your existing body.dark-mode toggle — no white rectangles on the dark theme, no flat gray blobs on the light one.

Adds an "Advertisement" chip at the top of each ad frame (also theme-aware and required by most ad policies anyway).

Grows the ad container from 300×250 to 300×600 — the half-page unit size, which is one of the tallest standard IAB slots. If Automattic only serves a 300×250 creative, the extra space stays clean and framed instead of empty.

Kills the stray float:left in Automattic's inline styles so widgets stop pushing each other sideways.

Fixes the "About these ads" link color so it's readable in both themes.

Mobile fallback at <360px so the 300px width never overflows.

Two quick notes
The CSS targets #right-sidebar aside.widget_block filtered by :has(.wpa), .wpa-about, and [id^="atatags-"] — all six of your current ad widgets (block-395, block-398, block-400, and the three below). If you add more, they'll pick up the styling automatically.

Making the visible slot taller doesn't make Automattic pay you more per impression — it just eliminates the theme mismatch and looks less cramped. If you want to swap those house ads for a paying network (AdSense, Ezoic, Mediavine), that's a separate step I'm happy to help plan.

Want me to screenshot the site after you publish so we can verify light + dark both look right?


Sidebar Ads CSS (theme-aware, taller)
CSS

Screenshot the site after I publish the CSS

Give me the CSS as a WordPress-ready snippet

Help me replace the house ads with paying ad units


/* =========================================================
   Microsoft News Now — Sidebar Ad Frames (theme-aware)
   Targets the 6 Automattic wpa/wpa-about widgets in #right-sidebar
   Works with the existing body.dark-mode toggle
   Paste into: Appearance → Customize → Additional CSS
   ========================================================= */

/* --- Theme tokens ------------------------------------------------ */
:root {
  --ad-bg: #ffffff;
  --ad-border: #e3e6ea;
  --ad-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .06);
  --ad-label-bg: #f4f6f8;
  --ad-label-fg: #5b6470;
  --ad-label-border: #e3e6ea;
  --ad-radius: 10px;
}

body.dark-mode {
  --ad-bg: #1b1d21;
  --ad-border: #2b2f36;
  --ad-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --ad-label-bg: #24272c;
  --ad-label-fg: #c9cdd3;
  --ad-label-border: #2b2f36;
}

/* --- The ad widget wrapper -------------------------------------- */
/* Every Automattic house ad ships as <aside class="widget widget_block"> with
   an internal .wpa or .wpa-about div. We frame the whole widget, then
   restyle the inner ad container so it fills a taller slot cleanly. */

#right-sidebar aside.widget_block:has(.wpa),
#right-sidebar aside.widget_block:has(.wpa-about),
#right-sidebar aside.widget_block:has([id^="atatags-"]) {
  background: var(--ad-bg);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  box-shadow: var(--ad-shadow);
  padding: 34px 12px 14px;               /* room for the label at top */
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* "Advertisement" label chip pinned to the top of every ad frame */
#right-sidebar aside.widget_block:has(.wpa)::before,
#right-sidebar aside.widget_block:has(.wpa-about)::before,
#right-sidebar aside.widget_block:has([id^="atatags-"])::before {
  content: "Advertisement";
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ad-label-fg);
  background: var(--ad-label-bg);
  border: 1px solid var(--ad-label-border);
  border-radius: 6px;
  padding: 4px 8px;
  text-align: center;
  line-height: 1;
}

/* --- Inner ad container: make it taller ------------------------- */
/* Automattic renders the ad iframe inside a 300x250 wrapper with a fixed
   inline style. We override to 300x600 (half-page unit height) and let the
   iframe scale. If Automattic serves only a 300x250 creative, the extra
   space becomes a clean framed area — no white rectangle in dark mode. */

#right-sidebar aside.widget_block .wpa,
#right-sidebar aside.widget_block .wpa-about,
#right-sidebar aside.widget_block > div[style*="width:300px"],
#right-sidebar aside.widget_block > div[style*="width: 300px"] {
  width: 300px !important;
  height: 600px !important;              /* half-page height */
  max-width: 100%;
  float: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
}

/* Make the ad iframe fill the taller container and match theme surface */
#right-sidebar aside.widget_block iframe {
  width: 100% !important;
  max-width: 300px;
  height: 100% !important;
  min-height: 250px;
  border: 0;
  background: var(--ad-bg);
  border-radius: 6px;
  display: block;
}

/* Kill Automattic's stray inline float that pushes the next widget sideways */
#right-sidebar aside.widget_block::after {
  content: "";
  display: block;
  clear: both;
}

/* --- Small niceties --------------------------------------------- */
/* Any text/links Automattic renders inside the ad (e.g., "About these ads")
   inherit theme-appropriate colors instead of default blue on dark. */
#right-sidebar aside.widget_block .wpa-about a,
#right-sidebar aside.widget_block .u.inline {
  color: var(--ad-label-fg) !important;
  font-size: 11px;
}

/* Mobile: don't force 300px width to overflow narrow screens */
@media (max-width: 360px) {
  #right-sidebar aside.widget_block .wpa,
  #right-sidebar aside.widget_block .wpa-about,
  #right-sidebar aside.widget_block > div[style*="width:300px"] {
    width: 100% !important;
    max-width: 300px;
    height: 500px !important;
  }
}