Skip to content

Commit

Permalink
cleanup: remove unused styles (commaai#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam authored Jun 16, 2024
1 parent 368aed9 commit f935c86
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 49 deletions.
6 changes: 3 additions & 3 deletions src/components/DeviceStatistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ const DeviceStatistics: VoidComponent<DeviceStatisticsProps> = (props) => {
<div class={clsx('flex h-10 w-full gap-8', props.class)}>
<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Distance</span>
<span class="text-label-lg font-mono uppercase">{formatDistance(allTime()?.distance)}</span>
<span class="font-mono text-label-lg uppercase">{formatDistance(allTime()?.distance)}</span>
</div>

<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Duration</span>
<span class="text-label-lg font-mono uppercase">{formatDuration(allTime()?.minutes)}</span>
<span class="font-mono text-label-lg uppercase">{formatDuration(allTime()?.minutes)}</span>
</div>

<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Routes</span>
<span class="text-label-lg font-mono uppercase">{allTime()?.routes ?? 0}</span>
<span class="font-mono text-label-lg uppercase">{allTime()?.routes ?? 0}</span>
</div>
</div>
)
Expand Down
8 changes: 4 additions & 4 deletions src/components/RouteStatistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ const RouteStatistics: VoidComponent<RouteStatisticsProps> = (props) => {
<div class={clsx('flex size-full items-stretch gap-8', props.class)}>
<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Distance</span>
<span class="text-label-lg font-mono uppercase">{formatRouteDistance(props.route)}</span>
<span class="font-mono text-label-lg uppercase">{formatRouteDistance(props.route)}</span>
</div>

<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Duration</span>
<span class="text-label-lg font-mono uppercase">{formatRouteDuration(props.route)}</span>
<span class="font-mono text-label-lg uppercase">{formatRouteDuration(props.route)}</span>
</div>

<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">Engaged</span>
<Suspense>
<span class="text-label-lg font-mono uppercase">{formatEngagement(timeline())}</span>
<span class="font-mono text-label-lg uppercase">{formatEngagement(timeline())}</span>
</Suspense>
</div>

<div class="flex flex-col justify-between">
<span class="text-body-sm text-on-surface-variant">User flags</span>
<Suspense>
<span class="text-label-lg font-mono uppercase">{formatUserFlags(timeline())}</span>
<span class="font-mono text-label-lg uppercase">{formatUserFlags(timeline())}</span>
</Suspense>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/material/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ type ListItemContentProps = {
export const ListItemContent: VoidComponent<ListItemContentProps> = (props) => {
return (
<div>
<div class="text-on-surface text-body-lg">{props.headline}</div>
{props.subhead && <div class="text-on-surface-variant text-body-md">{props.subhead}</div>}
<div class="text-body-lg text-on-surface">{props.headline}</div>
{props.subhead && <div class="text-body-md text-on-surface-variant">{props.subhead}</div>}
</div>
)
}
Expand Down
29 changes: 0 additions & 29 deletions src/components/material/Ripple.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Login() {
/>

<div class="flex flex-col items-center gap-2">
<h1 class="md:mt-4 text-display-sm font-extrabold">comma connect</h1>
<h1 class="text-display-sm font-extrabold md:mt-4">comma connect</h1>
<p class="text-body-lg">Manage your openpilot experience.</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/components/DeviceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DeviceList: VoidComponent<DeviceListProps> = (props) => {
<ListItemContent
headline={getDeviceName(device)}
subhead={
<span class="lowercase text-label-sm font-mono">
<span class="font-mono text-label-sm lowercase">
{device.dongle_id}
</span>
}
Expand Down
9 changes: 0 additions & 9 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ export default {
}],
},
keyframes: {
ripple: {
'100%': {
transform: 'scale(4)',
opacity: '0',
},
},
shimmer: {
'100%': {
transform: 'translateX(100%)',
Expand Down Expand Up @@ -203,15 +197,12 @@ export default {
},
},
animation: {
ripple: 'ripple 600ms linear',
indeterminate1: 'indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite',
indeterminate2: 'indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite',
'circular-rotate': 'circular-rotate 1.4s linear infinite',
'circular-dash': 'circular-dash 1.4s ease-in-out infinite',
},
transitionProperty: {
typography: 'color, font-size, font-weight',
surface: 'background-color, border-color, color, box-shadow',
indeterminate: 'transform, background-color',
drawer: 'left, opacity, width',
},
Expand Down

0 comments on commit f935c86

Please sign in to comment.