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

312 lines
6.4 KiB
SCSS
Raw Normal View History

.sidebar {
2016-11-23 19:44:39 +00:00
display: flex;
flex-flow: column;
}
.sidebar__header {
2016-12-19 22:19:07 +00:00
padding-right: #{6 / $base-font-size}rem;
padding-left: #{19 / $base-font-size}rem;
display: flex;
justify-content: space-between;
2016-07-14 16:47:54 +00:00
align-items: center;
height: #{29 / $base-font-size}rem;
min-height: #{29 / $base-font-size}rem;
position: relative;
}
.sidebar__title {
font-size: #{12 / $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 {
Update sketch list styling (#819) * parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540243 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540198 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560539667 -0400 Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Dropdown menu disappearing while clicking anywhere on the table Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Made changes in the dropdown: Arrow positioned slightly updwards, Removed blank space and added box-shadow in dropdown, themifyed dropdowns dashed border color Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box Added download functionality to Dialog box SketchList does not open a sketch if dialogue box is opened SketchList Rename initial UI completed Enter key handled for rename project option [WIP] Updating rename functionality Download option now working for all the sketches Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Final styling of ActionDialogueBox commplete Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Added Delete and Share functionality to Dialog box [WIP] Updating rename functionality Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Final styling of ActionDialogueBox commplete Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX * fix bugs in merge commit * move sketch list dialogue to ul/li * update sketch option dropdown to use dropdown placeholder, remove unused css * major refactor of sketchlist component, fix showShareModal action, minor updates ot icon sizing * fix broken links on asset list * remove unused image, fix options for different users in sketch list
2019-06-19 20:21:25 +00:00
width: #{20 / $base-font-size}rem;
height: #{20 / $base-font-size}rem;
@include icon();
2016-09-13 21:05:42 +00:00
.sidebar--contracted & {
display: none;
2016-07-14 16:47:54 +00:00
}
& svg {
width: #{10 / $base-font-size}rem;
}
}
.sidebar__file-list {
@include themify() {
border-color: getThemifyVariable('ide-border-color')
}
border-top: 1px solid;
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;
overflow-y: auto;
2016-11-23 19:44:39 +00:00
flex: 1 1 auto;
@include themify() {
border-top: 1px solid map-get($theme-map, 'ide-border-color');
}
.sidebar--contracted & {
border: none;
}
2016-08-30 18:39:37 +00:00
}
.sidebar__file-item {
font-size: #{12 / $base-font-size}rem;
2016-07-12 16:25:48 +00:00
cursor: pointer;
position: relative;
2016-09-14 22:38:57 +00:00
@include themify() {
color: map-get($theme-map, 'primary-text-color');
// TODO get this to not affect parent, need to move it into JS
&:hover:not(.sidebar__file-item--selected) > .file-item__content {
background-color: map-get($theme-map, 'file-hover-color');
2016-09-14 22:38:57 +00:00
}
}
}
2016-07-14 16:47:54 +00:00
2017-05-10 17:19:37 +00:00
.sidebar__file-item--folder {
z-index: 1;
}
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 {
flex-shrink: 0;
2016-08-30 18:39:37 +00:00
.sidebar__file-item & {
width: #{19 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
.sidebar__file-item & {
width: #{39 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
.sidebar__file-item & {
width: #{59 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
.sidebar__file-item & {
width: #{79 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
.sidebar__file-item & {
width: #{99 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
}
}
}
}
}
}
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
}
.sidebar__file-item-name--ellipsis {
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
min-width: #{15 / $base-font-size}rem;
}
.sidebar__file-item-name-text {
display: flex;
width: 100%;
overflow: hidden;
min-width: #{50 / $base-font-size}rem;
white-space: nowrap;
text-align: left;
}
2016-08-03 21:10:03 +00:00
.sidebar__file-item-name {
padding: #{4 / $base-font-size}rem 0;
padding-right: #{25 / $base-font-size}rem;
font-family: Inconsolata, monospace;
font-size: #{14 / $base-font-size}rem;
overflow: hidden;
2016-08-03 21:10:03 +00:00
.sidebar__file-item--editing & {
display: none;
}
&:before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
width: 100%;
}
@include themify() {
color: map-get($theme-map, 'primary-text-color');
}
2016-08-03 21:10:03 +00:00
}
2016-08-03 19:11:59 +00:00
.sidebar__file-item-show-options {
Update sketch list styling (#819) * parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540243 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540198 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560539667 -0400 Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Dropdown menu disappearing while clicking anywhere on the table Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Made changes in the dropdown: Arrow positioned slightly updwards, Removed blank space and added box-shadow in dropdown, themifyed dropdowns dashed border color Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box Added download functionality to Dialog box SketchList does not open a sketch if dialogue box is opened SketchList Rename initial UI completed Enter key handled for rename project option [WIP] Updating rename functionality Download option now working for all the sketches Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Final styling of ActionDialogueBox commplete Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Added Delete and Share functionality to Dialog box [WIP] Updating rename functionality Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Final styling of ActionDialogueBox commplete Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX * fix bugs in merge commit * move sketch list dialogue to ul/li * update sketch option dropdown to use dropdown placeholder, remove unused css * major refactor of sketchlist component, fix showShareModal action, minor updates ot icon sizing * fix broken links on asset list * remove unused image, fix options for different users in sketch list
2019-06-19 20:21:25 +00:00
width: #{20 / $base-font-size}rem;
height: #{20 / $base-font-size}rem;
@include icon();
@include themify() {
Update sketch list styling (#819) * parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540243 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540198 -0400 parent b3c3efcec96b5e5bb4e00be742e8f17a025db409 author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530 committer Cassie Tarakajian <ctarakajian@gmail.com> 1560539667 -0400 Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Dropdown menu disappearing while clicking anywhere on the table Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Made changes in the dropdown: Arrow positioned slightly updwards, Removed blank space and added box-shadow in dropdown, themifyed dropdowns dashed border color Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box Added download functionality to Dialog box SketchList does not open a sketch if dialogue box is opened SketchList Rename initial UI completed Enter key handled for rename project option [WIP] Updating rename functionality Download option now working for all the sketches Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Created initial html structure and styling for new SketchList design Final styling of ActionDialogueBox commplete Added Delete and Share functionality to Dialog box Added Duplicate functionality to Dialog box [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Final styling of ActionDialogueBox commplete Fixed linting issues and renamed variables Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown Added Delete and Share functionality to Dialog box [WIP] Updating rename functionality Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX fix broken files from rebasing Final styling of ActionDialogueBox commplete Minor tweaks in the SketchList dropdown dialogue UI Themifyed the dropdown [WIP] Updating rename functionality Duplicate functionality extended for non opened sketches too Modified overlay behaviour to close only the last overlay Share modal can now display different projects Dropdown closes when Share and Delete are closing for a more natural UX * fix bugs in merge commit * move sketch list dialogue to ul/li * update sketch option dropdown to use dropdown placeholder, remove unused css * major refactor of sketchlist component, fix showShareModal action, minor updates ot icon sizing * fix broken links on asset list * remove unused image, fix options for different users in sketch list
2019-06-19 20:21:25 +00:00
margin-right: #{5 / $base-font-size}rem;
2016-09-13 21:05:42 +00:00
}
display: none;
position: absolute;
right: 0;
2016-09-13 21:05:42 +00:00
.sidebar__file-item--selected > .file-item__content & {
display: inline-block;
.sidebar--cant-edit & {
display: none;
}
2016-08-03 19:11:59 +00:00
}
2019-03-13 12:40:47 +00:00
.sidebar__file-item:hover > .file-item__content & {
display: inline-block;
.sidebar--cant-edit & {
display: none;
}
2019-03-13 12:40:47 +00:00
}
& svg {
width: #{10 / $base-font-size}rem;
}
.sidebar__file-item--open > .file-item__content & {
display: inline-block;
}
2016-08-03 19:11:59 +00:00
}
.sidebar__file-item-options {
@extend %dropdown-open-right;
2016-08-03 19:11:59 +00:00
display: none;
width: 100%;
max-width: #{180 / $base-font-size}rem;
2016-08-30 18:39:37 +00:00
.sidebar__file-item--open > .file-item__content & {
display: flex;
}
}
2016-08-03 21:10:03 +00:00
.sidebar__file-item-input {
display: none;
padding: 0;
border: 0;
width: calc(100% - #{63 / $base-font-size}rem);
font-family: Inconsolata, monospace;
font-size: #{14 / $base-font-size}rem;
2016-08-03 21:10:03 +00:00
.sidebar__file-item--editing & {
display: inline-block;
}
}
.sidebar__expand,
.sidebar__contract {
@include icon();
position: absolute;
top: #{2 / $base-font-size}rem;
left: #{0 / $base-font-size}rem;
height: #{25 / $base-font-size}rem;
width: #{49 / $base-font-size}rem;
border-radius: 2px;
2020-04-29 22:34:37 +00:00
display: flex;
justify-content: center;
align-items: center;
@include themify() {
background-color: getThemifyVariable("toolbar-button-background-color");
2020-04-29 22:34:37 +00:00
& polygon, & path {
fill: getThemifyVariable("toolbar-button-color");
}
&:hover {
background-color: getThemifyVariable("button-background-hover-color");
2020-04-29 22:34:37 +00:00
& polygon, & path {
fill: getThemifyVariable("button-hover-color");
}
}
2016-09-13 21:05:42 +00:00
}
}
.sidebar__expand {
2016-09-13 21:05:42 +00:00
display: none;
&:hover {
cursor: e-resize;
}
2016-09-13 21:05:42 +00:00
.sidebar--contracted & {
2020-04-29 22:34:37 +00:00
display: flex;
2016-07-14 16:47:54 +00:00
}
}
2016-09-13 21:05:42 +00:00
.sidebar__contract {
&:hover {
cursor: w-resize;
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;
height: 100%;
.sidebar--cant-edit & {
display: none;
}
2016-07-14 16:47:54 +00:00
}
.sidebar__folder-icon {
padding: #{4 / $base-font-size}rem 0;
margin-right: #{5 / $base-font-size}rem;
2020-04-29 22:34:37 +00:00
& path {
2016-09-14 22:38:57 +00:00
@include themify() {
fill: map-get($theme-map, 'primary-text-color');
}
}
& svg {
width: #{10 / $base-font-size}rem;
}
}
.sidebar__file-item-icon {
padding: #{4 / $base-font-size}rem 0;
margin-right: #{5 / $base-font-size}rem;
2020-04-29 22:34:37 +00:00
& path {
2016-09-14 22:38:57 +00:00
@include themify() {
2020-04-27 20:48:55 +00:00
fill: getThemifyVariable('secondary-text-color');
2016-09-14 22:38:57 +00:00
}
}
background-color: transparent;
border: none;
}
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;
}
}
.sidebar__file-item--closed .file-item__children {
2016-08-30 03:23:10 +00:00
display: none;
}
.sidebar__project-options {
@extend %dropdown-open-right;
display: none;
width: 100%;
max-width: #{180 / $base-font-size}rem;
.sidebar--project-options & {
display: flex;
}
}