Skip to content

Commit 1797489

Browse files
authored
Fix permissions icon collision with bulleted lists (#56251)
1 parent f5eddfb commit 1797489

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/content-render/stylesheets/markdown-overrides.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,21 @@
3737
overflow-wrap: break-word;
3838
}
3939
}
40+
41+
// Fix for permissions icon collision with bulleted lists
42+
// When permissions/product statements contain lists that start immediately,
43+
// the list bullets can visually collide with the icons in the flex layout.
44+
// This adds proper spacing to prevent the collision while supporting RTL languages
45+
// and avoiding effects on nested lists.
46+
// See: https://github.com/github/docs-engineering/issues/5199
47+
.permissions-statement,
48+
.product-statement {
49+
ul {
50+
margin-inline-start: 0;
51+
padding-inline-start: 1rem; // Ensure proper spacing from icon (RTL-aware)
52+
}
53+
54+
ul > li {
55+
margin-inline-start: 0.5rem; // Additional spacing to prevent bullet collision (direct children only)
56+
}
57+
}

src/frame/components/ui/PermissionsStatement/PermissionsStatement.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export function PermissionsStatement({ product, permissions }: Props) {
1818
<h2 className="f4">{t('permissions_callout_title')}</h2>
1919
</div>
2020
{permissions && (
21-
<div className="d-flex" data-testid="permissions-statement">
21+
<div className="d-flex permissions-statement" data-testid="permissions-statement">
2222
<PersonIcon className="mt-1" />
2323
<div className="pl-2" dangerouslySetInnerHTML={{ __html: permissions }} />
2424
</div>
2525
)}
2626
{product && (
27-
<div className="d-flex" data-testid="product-statement">
27+
<div className="d-flex product-statement" data-testid="product-statement">
2828
<BriefcaseIcon className="mt-1" />
2929
<div className="pl-2" dangerouslySetInnerHTML={{ __html: product }} />
3030
</div>

0 commit comments

Comments
 (0)