Skip to content

Commit

Permalink
Merge pull request #256 from andymedinadev/fix/fractionCalculation
Browse files Browse the repository at this point in the history
Fix Fraction Explosion
  • Loading branch information
midudev authored Dec 2, 2024
2 parents da8d91d + 42e6075 commit e9c046a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/css/editors-layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,64 @@
height: 100vh;

[data-layout='default'] & {
& .first-gutter {
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .second-gutter {
background: transparent;
}
& .last-gutter {
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
}
[data-layout='layout-2'] & {
grid-template-areas:
'editor-html . editor-css'
'. . .'
'editor-js . editor-preview';

& .first-gutter {
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .second-gutter {
background: transparent;
}
& .last-gutter {
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
}
[data-layout='vertical'] & {
grid-template-areas: 'editor-html . editor-css . editor-js . editor-preview';
& .first-gutter {
cursor: col-resize;
grid-area: 1 / 2 / 1 / 2;
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .second-gutter {
cursor: col-resize;
grid-area: 1 / 4 / 1 / 4;
background-image: url(/assets/vertical.png);
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .last-gutter {
cursor: col-resize;
grid-area: 1 / 6 / 1 / 6;
background-image: url(/assets/vertical.png);
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
}
[data-layout='horizontal'] & {
Expand All @@ -53,15 +82,24 @@
grid-area: 2 / 1 / 2 / 1;
cursor: row-resize;
background-image: url(/assets/horizontal.png);
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
& .second-gutter {
grid-area: 4 / 1 / 4 / 1;
cursor: row-resize;
background-image: url(/assets/horizontal.png);
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
& .last-gutter {
grid-area: 6 / 1 / 6 / 1;
cursor: row-resize;
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
}
[data-layout='bottom'] & {
Expand All @@ -74,15 +112,24 @@
& .first-gutter {
cursor: col-resize;
grid-area: 2 / 2 / 4 / 3;
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .second-gutter {
cursor: col-resize;
grid-area: 2 / 4 / 4 / 5;
background-image: url(/assets/vertical.png);
position: relative;
box-shadow: -1px 0 0 0 var(--grid-background),
1px 0 0 0 var(--grid-background);
}
& .last-gutter {
cursor: row-resize;
grid-area: 2 / 1 / 2 / 6;
position: relative;
box-shadow: 0 -1px 0 0 var(--grid-background),
0 1px 0 0 var(--grid-background);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const setGridLayout = (type = '') => {
...(gutters.rowGutters && {
rowGutters: gutters.rowGutters.map(formatGutters)
}),
minSize: 1,
onDragEnd: saveGridTemplate
}

Expand Down

0 comments on commit e9c046a

Please sign in to comment.