Skip to content

Commit abf4632

Browse files
committed
feat: resolve inline styles
1 parent 676d614 commit abf4632

File tree

7 files changed

+14
-19
lines changed

7 files changed

+14
-19
lines changed

site/src/components/CustomLogo/CustomLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const CustomLogo: FC<{ css?: Interpolation<Theme> }> = (props) => {
2424
onLoad={(e) => {
2525
e.currentTarget.style.display = "inline";
2626
}}
27-
className="application-logo max-w-50"
27+
className="application-logo max-w-[200px]"
2828
/>
2929
) : (
3030
<CoderIcon {...props} className="w-12 h-12" />

site/src/components/Form/Form.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export const Form: FC<FormProps> = ({ direction, ...formProps }) => {
2828
{...formProps}
2929
className={cn(
3030
"flex flex-col gap-16",
31-
direction === "horizontal" && "md:gap-20",
32-
direction !== "horizontal" && "md:gap-10",
31+
direction === "horizontal" ? "md:gap-20" : "md:gap-10",
3332
)}
3433
/>
3534
</FormContext.Provider>

site/src/components/Loader/Loader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export const Loader: FC<LoaderProps> = ({
2121
<div
2222
{...attrs}
2323
className={cn(
24-
fullscreen && classNames.fullscreen,
25-
!fullscreen && classNames.inline,
24+
fullscreen ? classNames.fullscreen : classNames.inline,
2625
attrs.className,
2726
)}
2827
data-testid="loader"

site/src/components/Margins/Margins.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export const Margins: FC<MarginsProps> = ({
2727
<div
2828
{...divProps}
2929
style={{
30-
"--max-width": `${maxWidth}px`,
31-
"--padding": `${sidePadding}px`,
30+
...(maxWidth ? { maxWidth: `${maxWidth}px` } : {}),
31+
...(sidePadding ? { padding: `${sidePadding}px` } : {}),
3232
}}
33-
className="mx-auto px-[var(--padding,_auto)] w-full max-w-[var(--max-width,_100%)]"
33+
className="mx-auto w-full"
3434
>
3535
{children}
3636
</div>

site/src/components/Menu/MenuSearch.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ export const MenuSearch: FC<SearchFieldProps> = (props) => {
1111
fullWidth
1212
className={cn(
1313
"[&_fieldset]:border-0 [&_fieldset]:rounded-none",
14-
"[&_fieldset]:!border-0 [&_fieldset]:!border-b",
1514
"[&_fieldset]:!border-surface-quaternary",
15+
"[&_fieldset]:!border-0",
16+
// MUI has so many nested selectors that it's easier to just
17+
// override the border directly using the `!important` hack
18+
"[&_fieldset]:!border-b",
1619
)}
1720
{...props}
1821
/>

site/src/components/OverflowY/OverflowY.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ export const OverflowY: FC<OverflowYProps> = ({
3030
<div
3131
{...attrs}
3232
style={{
33-
"--computed-height": computedHeight,
34-
"--computed-max-height": computedMaxHeight,
33+
height: computedHeight,
34+
maxHeight: computedMaxHeight,
3535
}}
36-
className={cn(
37-
"w-full overflow-y-auto flex-shrink-1",
38-
"h-[var(--computed-height)]",
39-
"max-h-[var(--computed-max-height)]",
40-
attrs.className,
41-
)}
36+
className={cn("w-full overflow-y-auto flex-shrink-1", attrs.className)}
4237
>
4338
{children}
4439
</div>

site/src/components/PageHeader/PageHeader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export const PageHeaderSubtitle: FC<PageHeaderSubtitleProps> = ({
5252
<h2
5353
className={cn(
5454
"text-base font-normal block mb-0 text-content-secondary leading-[1.4]",
55-
condensed && "mt-1",
56-
!condensed && "mt-2",
55+
condensed ? "mt-1" : "mt-2",
5756
)}
5857
>
5958
{children}

0 commit comments

Comments
 (0)