From 7382d43266a0f983b5351a9372f09ee97ebe73ab Mon Sep 17 00:00:00 2001 From: Rafe Goldberg Date: Thu, 29 Aug 2024 13:45:44 -0400 Subject: [PATCH] style(Image): fix alignment oddities (#956) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | 🎫 Fix RM-10636 | | :-------------: | ## 🧰 Changes Images that did not specify their alignment were being forced to the center in MDX; they should default to the left. - [x] [don't force `[align]` to default to `"center"`](https://github.com/readmeio/markdown/pull/956/files#diff-1b96290f278c30bd682c1247de2db226763c471520a387108344a9d53d13de23R19) - [x] [fix some errant CSS alignment selectors](https://github.com/readmeio/markdown/pull/956/files#diff-19c7d495b0c7303322a8a6dcaf6813764594f9e77b9aabc2e5da9a1e274a6d92) ## 🧬 QA & Testing Pull this branch down, run `start`, and try rendering the following syntax: ``` ![](https://files.readme.io/2eb4d36-Screenshot_2024-08-05_at_21.34.12.png) ``` If the first image is aligned to the left and the latter is properly centered, this worked! :tada: --- __tests__/__snapshots__/index.test.js.snap | 2 +- __tests__/components/Image.test.tsx | 4 ++-- __tests__/components/__snapshots__/index.test.ts.snap | 2 +- components/Image/index.tsx | 6 +++--- components/Image/style.scss | 4 +--- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/__tests__/__snapshots__/index.test.js.snap b/__tests__/__snapshots__/index.test.js.snap index a7330bb0b..c022784ac 100644 --- a/__tests__/__snapshots__/index.test.js.snap +++ b/__tests__/__snapshots__/index.test.js.snap @@ -335,7 +335,7 @@ exports[`export multiple Markdown renderers > renders plain markdown as React 1` exports[`heading 1`] = `"

Example Header

"`; -exports[`image 1`] = `"Image"`; +exports[`image 1`] = `"Image"`; exports[`list items 1`] = ` "