Skip to content

Commit 8907c45

Browse files
authored
ref: replace codeFontSize with fontSize.sm (#104449)
1 parent 0a0080e commit 8907c45

File tree

12 files changed

+11
-21
lines changed

12 files changed

+11
-21
lines changed

static/app/components/core/code/codeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const Header = styled('div')<{isFloating: boolean}>`
238238
align-items: center;
239239
240240
font-family: ${p => p.theme.text.familyMono};
241-
font-size: ${p => p.theme.codeFontSize};
241+
font-size: ${p => p.theme.fontSize.sm};
242242
color: var(--prism-base);
243243
font-weight: ${p => p.theme.fontWeight.bold};
244244
z-index: 2;

static/app/components/events/autofix/autofixDiff.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ const FileDiffWrapper = styled('div')<{integratedStyle?: boolean}>`
688688
font-family: ${p => p.theme.text.familyMono};
689689
font-size: ${p => p.theme.fontSize.sm};
690690
& code {
691-
font-size: ${p => (p.integratedStyle ? p.theme.fontSize.sm : p.theme.codeFontSize)};
691+
font-size: ${p => p.theme.fontSize.sm};
692692
}
693693
line-height: 20px;
694694
vertical-align: middle;

static/app/components/events/breadcrumbs/breadcrumbItemContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,6 @@ const SQLText = styled('pre')`
274274
const BreadcrumbText = styled(Timeline.Text)`
275275
white-space: pre-wrap;
276276
font-family: ${p => p.theme.text.familyMono};
277-
font-size: ${p => p.theme.codeFontSize};
277+
font-size: ${p => p.theme.fontSize.sm};
278278
color: ${p => p.theme.textColor};
279279
`;

static/app/components/prevent/virtualRenderers/virtualDiffRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ const TextArea = styled('textarea')`
365365
outline: 0px solid transparent;
366366
outline-offset: 0px;
367367
font-family: ${p => p.theme.text.familyMono};
368-
font-size: ${p => p.theme.codeFontSize};
368+
font-size: ${p => p.theme.fontSize.sm};
369369
padding-top: 0;
370370
padding-bottom: 0;
371371
padding-right: 0;

static/app/components/prevent/virtualRenderers/virtualFileRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ const TextArea = styled('textarea')`
295295
outline: 0px solid transparent;
296296
outline-offset: 0px;
297297
font-family: ${p => p.theme.text.familyMono};
298-
font-size: ${p => p.theme.codeFontSize};
298+
font-size: ${p => p.theme.fontSize.sm};
299299
padding-top: 0;
300300
padding-bottom: 0;
301301
padding-right: 0;

static/app/styles/global.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const prismStyles = (theme: Theme) => css`
2929
code[class*='language-'] {
3030
color: var(--prism-base);
3131
background: var(--prism-block-background);
32-
font-size: ${theme.codeFontSize};
32+
font-size: ${theme.fontSize.sm};
3333
text-shadow: none;
3434
font-family: ${theme.text.familyMono};
3535
direction: ltr;

static/app/utils/theme/theme.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,6 @@ const commonTheme = {
624624
bold: 600 as const,
625625
},
626626

627-
/**
628-
* @TODO(jonasbadalic) remove relative font sizes
629-
* @deprecated use fontSize instead
630-
*/
631-
codeFontSize: '13px' as const,
632-
633627
text: {
634628
family: "'Rubik', 'Avenir Next', sans-serif",
635629
familyMono: "'Roboto Mono', Monaco, Consolas, 'Courier New', monospace",

static/app/views/explore/logs/styles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const DetailsBody = styled('div')`
198198
border-bottom: 1px solid ${p => p.theme.innerBorder};
199199
padding: ${space(1)} 0;
200200
font-family: ${p => p.theme.text.familyMono};
201-
font-size: ${p => p.theme.codeFontSize};
201+
font-size: ${p => p.theme.fontSize.sm};
202202
203203
&:last-child {
204204
border-bottom: 0;
@@ -268,7 +268,7 @@ export const AlignedCellContent = styled('div')<{
268268
flex-direction: row;
269269
justify-content: ${p => p.align || 'left'};
270270
font-family: ${p => p.theme.text.familyMono};
271-
font-size: ${p => p.theme.codeFontSize};
271+
font-size: ${p => p.theme.fontSize.sm};
272272
`;
273273

274274
export const FirstTableHeadCell = styled(TableHeadCell)`

static/app/views/insights/pages/platform/nextjs/serverTree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ const OneLineCodeBlock = styled('pre')`
392392
display: flex;
393393
align-items: center;
394394
justify-content: space-between;
395-
font-size: ${p => p.theme.codeFontSize};
395+
font-size: ${p => p.theme.fontSize.sm};
396396
font-family: ${p => p.theme.text.familyMono};
397397
gap: ${space(0.5)};
398398
padding: ${space(0.5)} ${space(1)};

static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ function MultilineJSON({
13461346

13471347
const MultilineTextWrapperMonospace = styled(MultilineTextWrapper)`
13481348
font-family: ${p => p.theme.text.familyMono};
1349-
font-size: ${p => p.theme.codeFontSize};
1349+
font-size: ${p => p.theme.fontSize.sm};
13501350
`;
13511351

13521352
const MultilineTextLabel = styled('div')`

0 commit comments

Comments
 (0)