Skip to content

Commit 37ed646

Browse files
committed
improvement(org): stop the page surface depending on host utilities it cannot generate
1 parent 551fc64 commit 37ed646

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.page {
2+
display: grid;
3+
grid-template-columns: minmax(0, 1fr);
4+
flex: 1;
5+
block-size: 100%;
6+
min-block-size: 0;
7+
min-inline-size: 0;
8+
overflow-y: auto;
9+
}

‎apps/sim/platform/design-system/components/surface/surface.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import '@/platform/design-system/styles/embedded.css'
44
import type { ReactNode } from 'react'
55
import { PlatformSurface } from '@/platform/design-system/components/surface/platform-surface'
6+
import styles from '@/platform/design-system/components/surface/surface.module.css'
67

78
interface SurfaceProps {
89
/** Paints the canvas, for a surface that fills a region. */
@@ -25,15 +26,10 @@ export function Surface({ canvas, children }: SurfaceProps) {
2526
)
2627
}
2728

28-
/**
29-
* Fills the app's content slot, and the grid stretches the surface so its canvas reaches the end.
30-
*
31-
* The host's Tailwind does not scan `platform/`, so these utilities exist only while a scanned file
32-
* also names them (`grid-cols-[minmax(0,1fr)]`: `settings-frame.tsx`).
33-
*/
29+
/** Fills the app's content slot, and the grid stretches the surface so its canvas reaches the end. */
3430
export function PageSurface({ children }: { children: ReactNode }) {
3531
return (
36-
<div className='grid h-full min-h-0 min-w-0 flex-1 grid-cols-[minmax(0,1fr)] overflow-y-auto'>
32+
<div className={styles.page}>
3733
<Surface canvas>{children}</Surface>
3834
</div>
3935
)

0 commit comments

Comments
 (0)