Skip to content

Commit cce3f8f

Browse files
codydecursoragent
authored andcommitted
feat: Change visual emphasis of code snippets and info callout (#14065)
Code snippets across the documentation application now feature a consistent border style, aligning with the `Expandable` component's `callout` styling for visual cohesion. This involved updating borders to `1px solid var(--accent-11)` and `border-radius` to `6px` across various code-related components. Also updated callout-info boxes to an accent of 6 instead to reduce visual of the container itself. Text styling is unchanged to still pull in on text as needed, Creates a better contast. Specific changes were applied to: * Main code blocks in `src/components/codeBlock/code-blocks.module.scss`: * `pre[class*='language-']` now has `border: 1px solid var(--accent-11)` and `border-radius: 6px`. * The `pre` element's `border-radius` was also updated to `6px` for consistency. * Code tabs in `src/components/codeTabs.tsx`: * The `TabBar` and the code `Container` now use `1px solid var(--accent-11)` borders. * `TabBar` `border-radius` was set to `6px 6px 0 0`, and `Container` `border-radius` to `0 0 6px 6px` to maintain rounded corners. * Code highlights in `src/components/codeHighlights/codeHighlights.tsx`: * The `HighlightBlockContainer` received `border: 1px solid var(--accent-11)` and `border-radius: 6px`. * Updated callout styles.scss to reduce the intensity of highlight color --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 33bb4f8 commit cce3f8f

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

src/components/callout/styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
}
6060

6161
.callout-info {
62-
--callout-highlight-color: var(--accent-11);
62+
--callout-highlight-color: var(--accent-6);
6363
background: var(--accent-2);
6464
}
6565

src/components/codeBlock/code-blocks.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
pre {
77
background-color: var(--code-background);
8-
border-radius: 0 0 0.25rem 0.25rem;
8+
border-radius: 0 0 6px 6px;
99
margin-top: 0;
1010
margin-bottom: 0;
1111
}
@@ -17,8 +17,8 @@
1717

1818
pre[class*='language-'] {
1919
font-size: 0.85rem;
20-
border: 0;
21-
border-radius: 4px;
20+
border: 1px solid var(--accent-11);
21+
border-radius: 6px;
2222
margin: 0;
2323
}
2424

src/components/codeHighlights/codeHighlights.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ const HighlightBlockContainer = styled('div')`
132132
background-color: rgba(239, 239, 239, 0.06);
133133
position: relative;
134134
135+
border: 1px solid var(--accent-11);
135136
border-left: 4px solid var(--accent-purple);
137+
border-radius: 6px;
136138
137139
.highlight-line {
138140
padding-left: 8px !important;

src/components/codeTabs.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,21 @@ export function CodeTabs({children}: CodeTabProps) {
136136
const Container = styled('div')`
137137
pre[class*='language-'] {
138138
padding: 10px 12px;
139-
border-radius: 0 0 3px 3px;
139+
border-radius: 0 0 6px 6px;
140+
border: 1px solid var(--accent-11);
141+
border-top: none;
140142
}
141143
`;
142144

143145
const TabBar = styled('div')`
144146
background: var(--code-background);
147+
border: 1px solid var(--accent-11);
145148
border-bottom: 1px solid #40364a;
146149
height: 36px;
147150
display: flex;
148151
align-items: center;
149152
padding: 0 0.5rem;
150-
border-radius: 3px 3px 0 0;
153+
border-radius: 6px 6px 0 0;
151154
`;
152155

153156
const TabButton = styled('button')`

0 commit comments

Comments
 (0)