Skip to content

Commit

Permalink
[docs-infra] Style collocation
Browse files Browse the repository at this point in the history
Style spread on two different files will be hard to keep in sync.
Follow-up on #41181
Also simplify the CSS selector for performance.
  • Loading branch information
oliviertassinari committed Feb 21, 2024
1 parent b98c0b5 commit 6f9d1af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 1 addition & 4 deletions docs/src/modules/components/Ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ export default function Ad() {
mt: AD_MARGIN_TOP,
mb: AD_MARGIN_BOTTOM,
minHeight: AD_HEIGHT_MOBILE,
'& a[target="_blank"]::after': {
// Remove link arrow for ads
display: 'none',
},
[theme.breakpoints.up('sm')]: {
minHeight: AD_HEIGHT,
},
Expand All @@ -242,6 +238,7 @@ export default function Ad() {
data-ga-event-category="ad"
data-ga-event-action="click"
data-ga-event-label={eventLabel}
className="Ad-root"
>
<AdErrorBoundary eventLabel={eventLabel}>{children}</AdErrorBoundary>
</Box>
Expand Down
6 changes: 5 additions & 1 deletion docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,14 @@ const Root = styled('div')(
opacity: 1,
transform: 'translate(1px, 0)',
},
'& a.remove-link-arrow[target="_blank"]::after': {
'& a.remove-link-arrow::after': {
// Allows to remove link arrows for images
display: 'none',
},
'& .MuiAd-root a::after': {
// Remove link arrow for ads
display: 'none',
},
'& a, & a code': {
// Style taken from the Link component
color: `var(--muidocs-palette-primary-600, ${lightTheme.palette.primary[600]})`,
Expand Down

0 comments on commit 6f9d1af

Please sign in to comment.