From 2320d1fc9f84fd757cecf39366f83141a9e3b68f Mon Sep 17 00:00:00 2001 From: cha0s Date: Fri, 2 Apr 2021 19:42:46 -0500 Subject: [PATCH] refactor: styles --- .../src/components/project/sidebar/index.scss | 71 +++++++++++-------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/packages/core/src/components/project/sidebar/index.scss b/packages/core/src/components/project/sidebar/index.scss index 878799e..443de5e 100644 --- a/packages/core/src/components/project/sidebar/index.scss +++ b/packages/core/src/components/project/sidebar/index.scss @@ -6,6 +6,46 @@ $sidebar-basis: 12rem; overflow-x: hidden; overflow-y: auto; width: 100%; + > .tree > .node > .item .label > .text { + flex-grow: 1; + overflow: hidden; + text-overflow: ellipsis; + } + .label > .icon { + background-size: cover; + margin-right: 0.125em; + width: 1em; + height: 1em; + &.AudioComponent { + background-image: url('./svg/sound.png'); + } + &.Binary { + background-image: url('./svg/question.png'); + } + &.EntityComponent { + background-image: url('./svg/joystick.png'); + } + &.ImageComponent { + background-image: url('./svg/image.png'); + } + &.SoundComponent { + background-image: url('./svg/music.png'); + } + &.TextComponent { + background-image: url('./svg/note.png'); + } + } + .node { + &.parent > .item .label:before { + content: "\25BE"; + margin-right: 0.25em; + } + &.collapsed { + &.parent > .item .label:before { + content: "\25B8"; + } + } + } } .sidebar-actions { @@ -35,34 +75,3 @@ $sidebar-basis: 12rem; } } } - -.sidebar > .tree > .node > .item .label > .text { - flex-grow: 1; - overflow: hidden; - text-overflow: ellipsis; -} - -.label > .icon { - background-size: cover; - margin-right: 0.125em; - width: 1em; - height: 1em; - &.AudioComponent { - background-image: url('./svg/sound.png'); - } - &.Binary { - background-image: url('./svg/question.png'); - } - &.EntityComponent { - background-image: url('./svg/joystick.png'); - } - &.ImageComponent { - background-image: url('./svg/image.png'); - } - &.SoundComponent { - background-image: url('./svg/music.png'); - } - &.TextComponent { - background-image: url('./svg/note.png'); - } -}