Skip to content

Commit

Permalink
Flexbox is like violence: if it doesn't work, you just need more of it
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-daniel committed Oct 30, 2023
1 parent 798d505 commit 4160059
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/web-console/src/components/Splitter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const Splitter = ({
display: "flex",
flexGrow: 0,
flexBasis: basis ?? fallback,
flexShrink: 0,
flexShrink: 1,
}

if (children.length === 1) {
Expand Down
2 changes: 2 additions & 0 deletions packages/web-console/src/scenes/Console/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ const Top = styled.div`
const Bottom = styled.div`
display: flex;
flex: 1;
min-height: 0px;
`

const Tab = styled.div`
display: flex;
width: calc(100% - 4.5rem);
height: 100%;
overflow: auto;
`

const viewModes: {
Expand Down
6 changes: 4 additions & 2 deletions packages/web-console/src/scenes/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { Help } from "./help"
const Page = styled.div`
display: flex;
width: 100%;
height: calc(100% - 4rem);
height: 100%;
flex-direction: column;
flex: 1;
overflow: hidden;
Expand All @@ -56,11 +56,13 @@ const Page = styled.div`
const Root = styled.div`
display: flex;
width: 100%;
height: 100%;
flex: 1;
overflow-y: auto;
`

const Main = styled.div<{ sideOpened: boolean }>`
flex: 1;
display: flex;
width: ${({ sideOpened }) =>
sideOpened ? "calc(100% - 50rem - 4.5rem)" : "calc(100% - 4.5rem)"};
`
Expand Down
1 change: 1 addition & 0 deletions packages/web-console/src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ ol.unstyled {
/* FOOTER */

#footer {
position: relative;
display: flex;
background: #21222c;
flex: 0 0 4rem;
Expand Down

0 comments on commit 4160059

Please sign in to comment.