From 1a400ce0877ff9e3d9adb7032a922dba423f2d4a Mon Sep 17 00:00:00 2001 From: Ricky de Laveaga Date: Mon, 29 Apr 2024 11:35:11 -0700 Subject: [PATCH] fix: pre white-space to pre-wrap, rename + fortify browser-sync script - Unstyled section in third post was breaking layout on mobile. Try toggling `pre-wrap` back to `pre` to see the issue: https://eleventeen.blog/archive/thirdpost/#unstyled or see it in Base Blog on small enough screens: https://eleventy-base-blog.netlify.app/blog/thirdpost/#unstyled Note text is larger in eleventeen. - `pre-wrap` Sequences of white space are preserved. Lines are broken at newline characters, at
, and as necessary to fill line boxes. https://developer.mozilla.org/en-US/docs/Web/CSS/white-space - rename browser-sync script from 9.2.11 / #23: https://github.com/rdela/eleventeen/releases/tag/v9.2.11-alpha.9 https://github.com/rdela/eleventeen/pull/23/files from `serve` to `bs` this disambiguates it from Eleventy's built in serve / dev server also might as well build first so now begins w/ `eleventy &&` --- package.json | 4 ++-- public/css/index.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b397fd6..71d20eb 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "build": "eleventy", "build-ghpages": "eleventy --pathprefix=/eleventeen/", "d": "eleventy --serve --quiet", - "noisy": "eleventy --serve", - "serve": "npx browser-sync '_site' --port 8080 --no-ghost-mode --no-notify --no-ui", "start": "eleventy --serve --quiet", + "noisy": "eleventy --serve", + "bs": "eleventy && npx browser-sync '_site' --port 8080 --no-ghost-mode --no-notify --no-ui", "debug": "DEBUG=Eleventy* eleventy", "debugstart": "DEBUG=Eleventy* eleventy --serve --quiet", "benchmark": "DEBUG=Eleventy:Benchmark* eleventy" diff --git a/public/css/index.css b/public/css/index.css index 981d518..1b9c057 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -241,7 +241,7 @@ pre:not([class*="language-"]) { hyphens: none; direction: ltr; text-align: left; - white-space: pre; + white-space: pre-wrap; word-spacing: normal; word-break: normal; }