mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
860353474a
* Got request moving working but is pretty messy * Can now drag between groups * Minor stuff * Prevent deletion of last workspace * Fixed some things * Copy-pasta RequestGroup drag-n-drop * Closes #2
220 lines
4.0 KiB
SCSS
220 lines
4.0 KiB
SCSS
@import '../constants/dimensions';
|
|
@import '../constants/colors';
|
|
|
|
.sidebar {
|
|
position: relative;
|
|
display: grid;
|
|
grid-template-rows: $line-height-md 1fr auto;
|
|
grid-template-columns: 1fr;
|
|
|
|
background-color: $bg-dark;
|
|
color: $font-dark-bg;
|
|
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
// ~~~~~~~~~~~~~~ //
|
|
// Sidebar Header //
|
|
// ~~~~~~~~~~~~~~ //
|
|
|
|
.sidebar__header {
|
|
background-color: $bg-brand;
|
|
color: $font-brand-bg;
|
|
width: 100%;
|
|
|
|
&:hover {
|
|
background-color: lighten($bg-brand, 1);
|
|
}
|
|
|
|
h1 {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
|
|
// HACK: Bump up the arrow a bit
|
|
i.fa-caret-down {
|
|
position: relative;
|
|
top: -2px;
|
|
}
|
|
}
|
|
|
|
// Make the dropdown offset to the right
|
|
.dropdown ul {
|
|
right: -40%;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0 $padding-md;
|
|
}
|
|
}
|
|
|
|
// ~~~~~~~~~~~~ //
|
|
// Sidebar List //
|
|
// ~~~~~~~~~~~~ //
|
|
|
|
.sidebar__list {
|
|
}
|
|
|
|
// Root list scrolling
|
|
|
|
& > .sidebar__list {
|
|
overflow-y: auto;
|
|
padding-bottom: $line-height-md;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
&:hover::-webkit-scrollbar {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
// ~~~~~~~~~~~ //
|
|
// Sidebar Row //
|
|
// ~~~~~~~~~~~ //
|
|
|
|
.sidebar__row {
|
|
position: relative;
|
|
|
|
&.sidebar__row--dragging {
|
|
// Set opacity on children so we can still see the separator
|
|
& > * {
|
|
opacity: 0.2;
|
|
}
|
|
}
|
|
|
|
&.sidebar__row--dragging-below::after,
|
|
&.sidebar__row--dragging-above::before {
|
|
position: absolute;
|
|
height: 2px;
|
|
content: " ";
|
|
width: 100%;
|
|
display: block;
|
|
background: lighten($success, 2);
|
|
}
|
|
}
|
|
|
|
// ~~~~~~~~~~~~ //
|
|
// Sidebar Item //
|
|
// ~~~~~~~~~~~~ //
|
|
|
|
.sidebar__item {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
grid-template-rows: $line-height-xs;
|
|
color: $hl;
|
|
|
|
& > * {
|
|
height: 100%;
|
|
}
|
|
|
|
&.sidebar__item--big {
|
|
grid-template-rows: $line-height-sm;
|
|
}
|
|
|
|
&.sidebar__item--active {
|
|
color: $font-dark-bg;
|
|
|
|
.tag {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
background-color: $hl-xxs;
|
|
}
|
|
|
|
.tag {
|
|
opacity: 0.5;
|
|
padding-left: 0;
|
|
text-align: left;
|
|
width: 2.8em;
|
|
}
|
|
}
|
|
|
|
.sidebar__item__icon {
|
|
padding-right: $padding-sm;
|
|
}
|
|
|
|
// ~~~~~~~~~~~~~~~~~ //
|
|
// Sidebar Clickable //
|
|
// ~~~~~~~~~~~~~~~~~ //
|
|
|
|
.sidebar__clickable {
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
align-items: center;
|
|
}
|
|
|
|
// Padding
|
|
|
|
.sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 2;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 3;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 4;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 5;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 6;
|
|
}
|
|
|
|
.sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__list .sidebar__clickable {
|
|
padding-left: $padding-md * 7;
|
|
}
|
|
|
|
// ~~~~~~~~~~~~~~~ //
|
|
// Sidebar Actions //
|
|
// ~~~~~~~~~~~~~~~ //
|
|
|
|
.sidebar__actions {
|
|
& > * {
|
|
height: 100%;
|
|
}
|
|
|
|
& > button,
|
|
& > .dropdown > button {
|
|
display: none;
|
|
color: $hl;
|
|
height: 100%;
|
|
padding: 0 $padding-sm;
|
|
}
|
|
|
|
& > button:hover,
|
|
& > .dropdown:hover > button {
|
|
color: $font-dark-bg;
|
|
}
|
|
}
|
|
|
|
.sidebar__item:hover .sidebar__actions > button,
|
|
.sidebar__item:hover .sidebar__actions > .dropdown > button {
|
|
display: initial;
|
|
}
|
|
|
|
// ~~~~~~~~~~~~~~ //
|
|
// Sidebar Footer //
|
|
// ~~~~~~~~~~~~~~ //
|
|
|
|
.sidebar__footer {
|
|
// Nothing yet
|
|
}
|
|
}
|