Skip to content

Commit 289ad63

Browse files
hannekeIan Wensink
authored andcommitted
fix(fieldset): fix inline label display styles (ie. for radio group legend)
1 parent a65c0cb commit 289ad63

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Fieldset/styled/legend.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,21 @@ export default styled(Legend)`
88
float: left;
99
padding: 0;
1010
margin-bottom: calc(${p => p.theme.spacingUnitFieldset} / 2);
11+
12+
${p => p.labelDisplay === 'inline' && `
13+
@media (min-width: 768px) {
14+
width: ${p.theme.inlineLabelWidth};
15+
padding-right: calc(${p.theme.spacingUnit} / 2);
16+
}
17+
`}
18+
19+
${p => p.labelDisplay === 'invisible' && `
20+
display: none;
21+
`}
22+
23+
${p => p.labelDisplay === 'before' && `
24+
display: block;
25+
float: none;
26+
width: 100%;
27+
`}
1128
`;

0 commit comments

Comments
 (0)