change size of text for rich text on mobile

Topic summary

Change Rich text caption size on mobile (Shopify Dawn) without affecting desktop.

  • Solution: Edit theme CSS (Online Store > Themes > Edit code > Assets > base.css/theme.css) and add a mobile-only media query.

  • Code approach: Use @media (max-width: 749px) to set a smaller font-size for p.rich-text__caption.subtitle and optionally reduce padding via .rich-text__wrapper { padding: 0; }.

  • Rationale: A CSS media query applies styles only on screens up to 749px wide (typical mobile breakpoint), preserving desktop appearance.

  • Outcome: The proposed CSS worked; font size can be adjusted as needed (e.g., 12px or other).

  • Visuals: Before/after images and a result screenshot were shared to confirm the change.

Status: Resolved; no outstanding questions or disagreements.

Summarized with AI on December 15. AI used: gpt-5.

Hi @ads18922

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (max-width: 749px){
.section-template--23797630435651__rich_text_FX4q4B-padding p.rich-text__caption.subtitle {
    font-size: 12px;
}
.rich-text__wrapper {
    padding: 0;
}
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!