Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): make color swatches visible on the color docs page (#2991)

rubyycheung34b4e59c7c0e
diff --git a/apps/docsite/src/components/tokens/ColorTokenTable.tsx b/apps/docsite/src/components/tokens/ColorTokenTable.tsx
index 94eba23573..dd8177777d 100644
--- a/apps/docsite/src/components/tokens/ColorTokenTable.tsx
+++ b/apps/docsite/src/components/tokens/ColorTokenTable.tsx
@@ -19,23 +19,24 @@ const styles = stylex.create({
width: 28,
height: 28,
borderRadius: 'var(--radius-element)',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
flexShrink: 0,
- border: '1px solid var(--color-border)',
+ overflow: 'hidden',
+ borderWidth: 1,
+ borderStyle: 'solid',
+ borderColor: 'var(--color-border-gray)',
},
swatchInner: {
- width: 20,
- height: 20,
- borderRadius: 'var(--radius-inner)',
+ width: '100%',
+ height: '100%',
},
swatch: {
width: 28,
height: 28,
borderRadius: 'var(--radius-element)',
flexShrink: 0,
- border: '1px solid var(--color-border)',
+ borderWidth: 1,
+ borderStyle: 'solid',
+ borderColor: 'var(--color-border-gray)',
},
});
@@ -48,7 +49,10 @@ function ContextSwatch({
}) {
return (
<div
- style={{backgroundColor: surface === 'light' ? '#FFFFFF' : '#1C1C1E'}}
+ style={{
+ backgroundColor: surface === 'light' ? '#FFFFFF' : '#1C1C1E',
+ colorScheme: surface,
+ }}
{...stylex.props(styles.surface)}>
<div
{...stylex.props(styles.swatchInner)}