Skip to content
Snippets Groups Projects
Commit cf4e1503 authored by Justin Toupin's avatar Justin Toupin
Browse files

Make controls sticky.

parent 7867d10e
No related branches found
No related tags found
No related merge requests found
Pipeline #430813 failed
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
--lp-btn-bg-color: #0550E6; --lp-btn-bg-color: #0550E6;
--lp-btn-fg-color: #fff; --lp-btn-fg-color: #fff;
--lp-controls-sticky-top: 170px;
} }
.lp-builder { .lp-builder {
...@@ -41,6 +43,7 @@ ...@@ -41,6 +43,7 @@
} }
.js-lpb-component { .js-lpb-component {
position: relative; position: relative;
margin: 0 auto;
} }
.lpb-hover-label { .lpb-hover-label {
background: #888; background: #888;
...@@ -101,11 +104,6 @@ ...@@ -101,11 +104,6 @@
.js-lpb-component[data-active="true"] .js-lpb-region > .lpb-btn--add:focus { .js-lpb-component[data-active="true"] .js-lpb-region > .lpb-btn--add:focus {
opacity: 1; opacity: 1;
} }
.lpb-layout .lpb-layout-label { .lpb-layout .lpb-layout-label {
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -113,24 +111,22 @@ ...@@ -113,24 +111,22 @@
border: 1px dotted #ccc; border: 1px dotted #ccc;
font-size: small; font-size: small;
} }
.lpb-controls__wrapper { .lpb-controls__wrapper {
position: absolute; position: absolute;
} }
.lpb-controls { .lpb-controls {
position: absolute; position: sticky;
z-index: 80; z-index: 80;
top: 0; top: var(--lp-controls-sticky-top);
left: 50%; margin: 0 auto;
transform: translate(-50%, calc(-100% - 15px)); transform: translateY(calc(-100% - 15px));
display: flex; display: flex;
padding: 2px 2px 2px 15px; padding: 2px 2px 2px 15px;
opacity: 0; opacity: 0;
border-radius: 4px; border-radius: 4px;
background-color: var(--lp-controls-bg-color, #fff); background-color: var(--lp-controls-bg-color, #fff);
color: var(--lp-controls-fg-color, #000); color: var(--lp-controls-fg-color, #000);
width: min-content;
& .lpb-controls-label { & .lpb-controls-label {
padding: 0 5px 0 0; padding: 0 5px 0 0;
text-transform: uppercase; text-transform: uppercase;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment