p5.js-web-editor/client/styles/components/_sidebar.scss

224 lines
4.5 KiB
SCSS
Raw Normal View History

.sidebar__header {
2016-09-14 22:38:57 +00:00
@include themify() {
border-top: 1px solid map-get($theme-map, 'ide-border-color');
}
padding: #{10 / $base-font-size}rem #{6 / $base-font-size}rem;
display: flex;
justify-content: space-between;
2016-07-14 16:47:54 +00:00
align-items: center;
height: #{47 / $base-font-size}rem;
}
.sidebar__title {
2016-07-14 16:47:54 +00:00
font-size: #{16 / $base-font-size}rem;
display: inline-block;
2016-07-14 16:47:54 +00:00
.sidebar--contracted & {
display: none;
}
white-space: nowrap;
overflow: hidden;
}
.sidebar__add {
@include themify() {
@extend %icon;
2016-09-13 21:05:42 +00:00
}
.sidebar--contracted & {
display: none;
2016-07-14 16:47:54 +00:00
}
}
.sidebar__file-list {
2016-07-12 16:25:48 +00:00
border-top: 1px solid $ide-border-color;
2016-07-14 16:47:54 +00:00
.sidebar--contracted & {
display: none;
}
}
2016-08-30 18:39:37 +00:00
.sidebar__root-item {
position: relative;
}
.sidebar__file-item {
2016-07-14 16:47:54 +00:00
font-size: #{16 / $base-font-size}rem;
2016-07-12 16:25:48 +00:00
cursor: pointer;
2016-09-14 22:38:57 +00:00
@include themify() {
color: map-get($theme-map, 'inactive-text-color');
&:hover > .file-item__content .sidebar__file-item-name {
color: map-get($theme-map, 'primary-text-color');
}
&:hover > .file-item__content .sidebar__file-item-icon g {
fill: map-get($theme-map, 'primary-text-color');
}
}
}
2016-07-14 16:47:54 +00:00
2016-08-30 18:39:37 +00:00
// to indent each row in the file tree
// not sure how to do this in a better way
// it won't work if the file tree is too nested
.file-item__spacer {
.sidebar__file-item & {
width: #{20 / $base-font-size}rem;
.sidebar__file-item & {
width: #{40 / $base-font-size}rem;
.sidebar__file-item & {
width: #{60 / $base-font-size}rem;
.sidebar__file-item & {
width: #{80 / $base-font-size}rem;
.sidebar__file-item & {
width: #{100 / $base-font-size}rem;
}
}
}
}
}
}
2016-08-23 23:40:47 +00:00
.file-item__content {
display: flex;
position: relative;
.sidebar__file-item--selected > & {
2016-09-14 22:38:57 +00:00
@include themify() {
2016-09-21 22:52:44 +00:00
background-color: map-get($theme-map, 'file-selected-color');
2016-09-14 22:38:57 +00:00
}
}
2016-09-04 00:29:18 +00:00
.sidebar--contracted & {
display: none;
}
2016-08-23 23:40:47 +00:00
}
2016-08-03 21:10:03 +00:00
.sidebar__file-item-name {
2016-09-21 22:52:44 +00:00
padding: #{8 / $base-font-size}rem 0;
2016-08-03 21:10:03 +00:00
.sidebar__file-item--editing & {
display: none;
}
}
2016-08-03 19:11:59 +00:00
.sidebar__file-item-show-options {
@include themify() {
@extend %icon;
2016-09-21 22:52:44 +00:00
padding: #{8 / $base-font-size}rem 0;
2016-09-13 21:05:42 +00:00
}
display: none;
position: absolute;
right: #{26 / $base-font-size}rem;
.sidebar__file-item--selected > .file-item__content & {
display: inline-block;
2016-08-03 19:11:59 +00:00
}
}
.sidebar__file-item-options {
@extend %modal;
2016-09-14 22:38:57 +00:00
@include themify() {
background-color: getThemeColor('modal-background-color');
}
2016-08-03 19:11:59 +00:00
position: absolute;
top: 95%;
left: 77%;
2016-08-30 03:43:02 +00:00
right: -65%;
2016-08-03 19:11:59 +00:00
display: none;
z-index: 100;
padding: #{8 / $base-font-size}rem #{16 / $base-font-size}rem;
z-index: 100;
2016-08-30 18:39:37 +00:00
.sidebar__file-item--open > .file-item__content & {
2016-08-03 19:11:59 +00:00
display: block;
}
}
2016-08-03 21:10:03 +00:00
.sidebar__file-item-input {
display: none;
padding: 0;
border: 0;
2016-09-21 22:52:44 +00:00
width: calc(100% - #{100 / $base-font-size}rem);
2016-08-03 21:10:03 +00:00
.sidebar__file-item--editing & {
display: inline-block;
}
}
2016-09-13 21:05:42 +00:00
.sidebar__expand {
@include themify() {
@extend %icon;
2016-09-13 21:05:42 +00:00
}
height: #{14 / $base-font-size}rem;
& svg {
2016-07-14 16:47:54 +00:00
height: #{14 / $base-font-size}rem;
2016-09-13 21:05:42 +00:00
}
display: none;
.sidebar--contracted & {
display: inline-block;
2016-07-14 16:47:54 +00:00
}
}
2016-09-13 21:05:42 +00:00
.sidebar__contract {
@include themify() {
@extend %icon;
2016-09-13 21:05:42 +00:00
}
margin-left: #{10 / $base-font-size}rem;
height: #{14 / $base-font-size}rem;
& svg {
2016-07-14 16:47:54 +00:00
height: #{14 / $base-font-size}rem;
2016-09-13 21:05:42 +00:00
}
.sidebar--contracted & {
display: none;
2016-07-14 16:47:54 +00:00
}
}
.sidebar__icons {
display: flex;
align-items: center;
2016-08-30 03:23:10 +00:00
position: relative;
2016-07-14 16:47:54 +00:00
}
.sidebar__folder-icon {
2016-09-21 22:52:44 +00:00
padding: #{8 / $base-font-size}rem 0;
margin-right: #{5 / $base-font-size}rem;
& g {
2016-09-14 22:38:57 +00:00
@include themify() {
fill: map-get($theme-map, 'primary-text-color');
}
}
}
.sidebar__file-item-icon {
2016-09-21 22:52:44 +00:00
padding: #{8 / $base-font-size}rem 0;
margin-right: #{5 / $base-font-size}rem;
2016-09-14 22:38:57 +00:00
& g {
@include themify() {
fill: getThemifyVariable('inactive-text-color');
}
}
}
2016-08-30 03:23:10 +00:00
2016-08-31 01:08:50 +00:00
.sidebar__file-item-closed {
@extend .sidebar__file-item-icon;
display: none;
.sidebar__file-item--closed & {
display: inline-block;
}
}
.sidebar__file-item-open {
@extend .sidebar__file-item-icon;
2016-09-21 23:08:30 +00:00
display: inline-block;
2016-08-31 01:08:50 +00:00
.sidebar__file-item--closed & {
display: none;
}
}
2016-08-30 03:23:10 +00:00
.sidebar__project-options {
@extend %modal;
display: none;
position: absolute;
.sidebar--project-options & {
display: block;
}
top: 100%;
2016-09-08 02:49:29 +00:00
right: #{-70 / $base-font-size}rem;
2016-08-30 03:23:10 +00:00
padding: #{8 / $base-font-size}rem;
width: #{110 / $base-font-size}rem;
}
.sidebar__file-item--closed .file-item__children {
display: none;
}