Skip to content

Commit 04b4f75

Browse files
ref: Adjust code highlight block styling (#13161)
- left border changed from pink to purple - fixed too much left padding for individual lines in highlight block - reduced vertical padding of highlight blocks. - cleaned up some unnecessary css values --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 8f29d0f commit 04b4f75

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/components/codeHighlights/codeHighlights.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function HighlightBlock({
113113
<CodeLinesContainer ref={codeRef}>{children}</CodeLinesContainer>
114114
<ClipBoardContainer onClick={copyCodeOnClick}>
115115
{showCopyButton && !copied && (
116-
<Clipboard size={16} opacity={0.15} stroke={'white'} />
116+
<Clipboard size={16} opacity={0.2} stroke={'white'} />
117117
)}
118118
{showCopyButton && copied && <Check size={16} stroke={'green'} />}
119119
</ClipBoardContainer>
@@ -132,26 +132,28 @@ const HighlightBlockContainer = styled('div')`
132132
background-color: rgba(239, 239, 239, 0.06);
133133
position: relative;
134134
135-
border-left: 4px solid var(--brandPink);
135+
border-left: 4px solid var(--accent-purple);
136+
137+
.highlight-line {
138+
padding-left: 8px !important;
139+
}
140+
141+
padding: 2px 0;
136142
137143
:hover svg {
138144
opacity: 1;
139145
}
140146
svg {
141147
transition: all 150ms linear;
148+
padding-bottom: 1px;
142149
}
143150
`;
144151

145152
const CodeLinesContainer = styled('div')`
146-
padding: 8px 0;
147153
width: calc(100% - 48px);
148154
`;
149155

150156
const ClipBoardContainer = styled('div')`
151-
position: absolute;
152-
right: 0;
153-
top: 0;
154-
bottom: 0;
155157
width: 48px;
156158
display: flex;
157159
justify-content: center;

0 commit comments

Comments
 (0)