Goal: reduce font size for specific homepage sections on mobile in a Shopify theme. Attempts to edit theme.css failed.
Diagnosis: existing CSS rules used !important (a CSS flag that forces a rule’s priority), making simple overrides ineffective. One such rule was in custom.css.
Solution provided: add mobile-only CSS using media queries (max-width: 768px) and place it at the bottom of the theme’s CSS so it loads last. Targeted selectors were the section header (.sitewide–title-wrapper h2.homepage-sections–title) and the paragraph text (.rte.featured-row__subtext.textarea p), setting the desired font sizes and using !important to override earlier rules.
Implementation steps: Admin > Online Store > Themes > Actions > Edit code; open the Asset file (theme-index.min.css) and append the mobile-specific rules at the end.
Outcome: the changes worked as intended; the requester confirmed success.
Notes: screenshots were included showing the affected sections and a code snippet location, but the core fix was the mobile media-query override. Status: resolved.
I would like to change the text size on these sections on my homepage, only on the mobile version of my site. I’ve tried to c/c code snippets in the theme.css to change the font size but nothing works.
You are having hard time changing the font size because you use !important. One of the code is in the custom.css file under the Asset folder. (See image below)