feat: padding and broderradius for blockquotes - #601
Merged
hryhoriiK97 merged 13 commits intoJul 31, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new padding and borderRadius styling options for markdownStyle.blockquote, aligning behavior across web/iOS/Android (and updating example + docs) similarly to the existing code block background/padding behavior.
Changes:
- Extend public and internal style types + normalization defaults to include
blockquote.borderRadiusandblockquote.padding. - Implement web CSS padding + border-radius for blockquote containers.
- Implement native (iOS/Android) rendering changes to support rounded backgrounds/stripes and per-nesting padding behavior; update docs and Storybook controls.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/react-native-enriched-markdown/src/web/styles.ts | Apply blockquote padding and borderRadius in web CSS styles. |
| packages/react-native-enriched-markdown/src/types/MarkdownStyleInternal.ts | Add borderRadius/padding to internal blockquote style contract. |
| packages/react-native-enriched-markdown/src/types/MarkdownStyle.ts | Expose borderRadius/padding on the public blockquote style type. |
| packages/react-native-enriched-markdown/src/normalizeMarkdownStyle.web.ts | Add default normalized values for web blockquote borderRadius/padding. |
| packages/react-native-enriched-markdown/src/normalizeMarkdownStyle.ts | Add default normalized values for native blockquote borderRadius/padding. |
| packages/react-native-enriched-markdown/src/EnrichedMarkdownTextNativeComponent.ts | Extend Fabric/codegen style types with new blockquote fields. |
| packages/react-native-enriched-markdown/src/EnrichedMarkdownNativeComponent.ts | Extend Fabric/codegen style types with new blockquote fields. |
| packages/react-native-enriched-markdown/ios/utils/StylePropsUtils.h | Propagate new blockquote style fields into StyleConfig. |
| packages/react-native-enriched-markdown/ios/utils/BlockquoteBorder.m | Redesign iOS blockquote drawing to support rounded region boxes + clipped stripes. |
| packages/react-native-enriched-markdown/ios/utils/BlockquoteBorder.h | Export new spacer attribute constant used by renderer logic. |
| packages/react-native-enriched-markdown/ios/styles/StyleConfig.mm | Store/copy new blockquote config fields and add accessors. |
| packages/react-native-enriched-markdown/ios/styles/StyleConfig.h | Declare new blockquote config accessors. |
| packages/react-native-enriched-markdown/ios/renderer/BlockquoteRenderer.m | Add vertical padding spacers and apply tail padding + updated nesting handling. |
| packages/react-native-enriched-markdown/ios/renderer/AttributedRenderer.m | Adjust trailing-spacing trimming to account for padded blockquotes at document end. |
| packages/react-native-enriched-markdown/ios/internals/MeasurementCache.h | Include new blockquote fields in style fingerprint hashing. |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/styles/BlockquoteStyle.kt | Parse new blockquote style fields from JS (RN package). |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt | Draw rounded background + clip stripes per boundary; account for nested padding. |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/renderer/BlockquoteRenderer.kt | Add a boundary padding span to adjust top/bottom metrics per quote. |
| packages/android-enriched-markdown/ui/src/main/java/com/swmansion/enriched/markdown/styles/DefaultStyles.kt | Set default borderRadius/padding for UI package. |
| packages/android-enriched-markdown/ui/src/main/java/com/swmansion/enriched/markdown/styles/BlockquoteStyle.kt | Add new blockquote style fields with defaults (UI package). |
| packages/android-enriched-markdown/ui/src/main/java/com/swmansion/enriched/markdown/spans/BlockquoteSpan.kt | Mirror rounded background + clipped stripe drawing changes (UI package). |
| packages/android-enriched-markdown/ui/src/main/java/com/swmansion/enriched/markdown/renderer/BlockquoteRenderer.kt | Mirror boundary padding span changes (UI package). |
| docs/STYLES.md | Document the new blockquote style options and usage example. |
| apps/react-native-example/.rnstorybook/stories/components/EnrichedMarkdownText/shared/storybookStyleBuilders.ts | Include new blockquote controls in style builder. |
| apps/react-native-example/.rnstorybook/stories/components/EnrichedMarkdownText/shared/storybookMarkdownStyles.ts | Add new Storybook control fields + defaults for blockquote. |
| apps/react-native-example/.rnstorybook/stories/components/EnrichedMarkdownText/block/Blockquote.stories.tsx | Add Storybook controls for borderRadius and padding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eszlamczyk
marked this pull request as ready for review
July 28, 2026 10:37
hryhoriiK97
reviewed
Jul 30, 2026
Collaborator
Author
hryhoriiK97
approved these changes
Jul 31, 2026
hryhoriiK97
deleted the
feat/103/padding-and-broderradius-for-blockquotes
branch
July 31, 2026 08:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What/Why?
Closes #103.
Adds
paddingandborderRadiusoptions tomarkdownStyle.blockquote, implemented the same way as the code block background.borderRadius(default0) - rounds the full-width blockquote background box. The accent stripe is clipped to the rounded shape, and each nested quote's stripe rounds against its own box, matching per-elementborder-radiuson web.padding(default0) - inner top/bottom spacing between the background box edges and the quote content (also applies to the trailing edge on iOS and web, same platform behavior ascodeBlock.padding). Applied at every nesting level, so nested quotes pad their own box and paddings stack at shared boundaries like nested elements on web. Leading-edge spacing is stillborderWidth+gapWidth.Testing
Example app / storybook - Blockquote stories with the new
borderRadiusandpaddingcontrols, on iOS and Android - including nested quotes, quote as the last document element, and defaults left at0(unchanged rendering).Screenshots
Padding: 10, borderRadius: 10PR Checklist