Skip to content

Commit 53c4d26

Browse files
authored
fix: reduce spectrum popover excessive padding (#2530)
Reduces from ~40px to ~16px. Targets popover dialog only. Added to styleguide just to be able to preview.
1 parent 9c969f0 commit 53c4d26

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

packages/code-studio/src/styleguide/SpectrumComponents.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ export function SpectrumComponents(): JSX.Element {
8888
</Dialog>
8989
)}
9090
</DialogTrigger>
91+
<DialogTrigger type="popover">
92+
<ActionButton>Popover</ActionButton>
93+
<Dialog>
94+
<Heading>Popover</Heading>
95+
<Divider />
96+
<Content>
97+
<Text>This is a popover.</Text>
98+
</Content>
99+
</Dialog>
100+
</DialogTrigger>
91101
</Flex>
92102
</SampleSection>
93103
<SampleSection name="spectrum-well" component={View}>

packages/components/src/theme/theme-spectrum/theme-spectrum-overrides.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,10 @@ span[class*='spectrum-ToggleSwitch-switch'] {
131131
/* increase contrast of switch in off position */
132132
background: var(--dh-toggle-switch-bg);
133133
}
134+
135+
[class*='spectrum-Popover'] {
136+
/* Spectrum popovers have excessive space. Tighten up the dialog padding to match DH style,
137+
padding was originally --spectrum-global-dimension-static-size-500) */
138+
139+
--spectrum-dialog-padding: var(--spectrum-global-dimension-size-200);
140+
}
589 Bytes
Loading
1.24 KB
Loading
189 Bytes
Loading

0 commit comments

Comments
 (0)