diff --git a/packages/docusaurus-theme/css/legacy.css b/packages/docusaurus-theme/css/legacy.css index a404b36..24353cb 100644 --- a/packages/docusaurus-theme/css/legacy.css +++ b/packages/docusaurus-theme/css/legacy.css @@ -1989,10 +1989,12 @@ code { white-space: pre; } -/* Inline code must wrap; the rule above forces white-space: pre, which overflows the page on mobile. */ -:not(pre) > code { - white-space: normal; - overflow-wrap: anywhere; +/* On mobile, let code wrap instead of overflowing the viewport. Overrides the + white-space: pre set above; pre-wrap keeps formatting but wraps long lines. */ +@media (max-width: 767px) { + code { + white-space: pre-wrap; + } } code p { diff --git a/packages/docusaurus-theme/package.json b/packages/docusaurus-theme/package.json index 1f702bf..0387366 100644 --- a/packages/docusaurus-theme/package.json +++ b/packages/docusaurus-theme/package.json @@ -1,6 +1,6 @@ { "name": "@netfoundry/docusaurus-theme", - "version": "0.15.0", + "version": "0.15.1", "description": "NetFoundry Docusaurus theme with shared layout, footer, and styling", "main": "dist/src/index.js", "types": "dist/src/index.d.ts",