Skip to content

Commit

Permalink
feat: Paper fold effect on sticky notes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed Apr 12, 2024
1 parent e0a6661 commit 88c3def
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions editor.planx.uk/src/pages/FlowEditor/floweditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $focus: #ffdd00;
$endpointWidth: 50px;
$hangerWidth: 16px;
$lineWidth: 2px;
$nodeBorderWidth: 1px;
$padding: 10px;
$editorPadding: 30px;
$pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAADElEQVQImWO4cOECAATkAnFXdNPtAAAAAElFTkSuQmCC);
Expand Down Expand Up @@ -157,7 +158,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
}

&.hasFailed {
border: 1px dashed red;
border: $nodeBorderWidth dashed red;
}

& > a {
Expand All @@ -167,7 +168,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
text-decoration: none;
cursor: pointer;
color: $black;
border: 1px solid $nodeBorder;
border: $nodeBorderWidth solid $nodeBorder;
background: white;
user-select: none;
padding: 6px 12px;
Expand Down Expand Up @@ -272,7 +273,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
.band {
width: 100%;
height: 12px;
border-bottom: 1px solid $optionBorder;
border-bottom: $nodeBorderWidth solid $optionBorder;
}
.text {
align-self: center;
Expand Down Expand Up @@ -314,7 +315,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
display: inline-block;
// width: $size;
text-decoration: none;
border: 1px solid $nodeBorder;
border: $nodeBorderWidth solid $nodeBorder;
min-width: $size;
max-width: 200px;
min-height: $size;
Expand Down Expand Up @@ -372,7 +373,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
}
}
.portalMenu {
border-left: 1px solid #aaa;
border-left: $nodeBorderWidth solid #aaa;
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -422,6 +423,29 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAA
&.question.isNote {
> a {
background: #fffdb0 !important;
position: relative;
padding-right: 20px;
// Triangle shapes to simulate paper fold on sticky note
&::before {
content: "";
position: absolute;
right: -$nodeBorderWidth;
bottom: -$nodeBorderWidth;
width: 0;
height: 0;
border-bottom: 12px solid #fff;
border-left: 12px solid transparent;
}
&::after {
content: "";
position: absolute;
right: -$nodeBorderWidth;
bottom: -$nodeBorderWidth;
width: 0;
height: 0;
border-top: 12px solid $nodeBorder;
border-right: 12px solid transparent;
}
}
}

Expand Down

0 comments on commit 88c3def

Please sign in to comment.