Skip to content

Commit

Permalink
refactor: move TreeView styles into a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
umaranis committed Jan 1, 2025
1 parent 7d2969c commit 8137c4c
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 186 deletions.
111 changes: 4 additions & 107 deletions demos/playground/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,6 @@ body {
padding: 0 20px;
}

header {
max-width: 580px;
margin: auto;
position: relative;
display: flex;
justify-content: center;
}

header a {
max-width: 220px;
margin: 20px 0 0 0;
display: block;
}

header img {
display: block;
height: 100%;
width: 100%;
}

header h1 {
text-align: left;
color: #333;
display: inline-block;
margin: 20px 0 0 0;
}

.editor-shell {
margin: 20px auto;
border-radius: 2px;
Expand All @@ -65,6 +38,7 @@ header h1 {
display: block;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border: #eee 1px solid;
}

.editor-shell .editor-container.tree-view {
Expand Down Expand Up @@ -99,30 +73,6 @@ header h1 {
width: 100%;
}

pre {
line-height: 1.1;
background: #222;
color: #fff;
margin: 0;
padding: 10px;
font-size: 12px;
overflow: auto;
max-height: 400px;
}

.tree-view-output {
display: block;
background: #222;
color: #fff;
padding: 0;
font-size: 12px;
margin: 1px auto 10px auto;
position: relative;
overflow: hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

pre::-webkit-scrollbar {
background: transparent;
width: 10px;
Expand Down Expand Up @@ -1357,61 +1307,6 @@ button.action-button:disabled {
}
}

.debug-timetravel-panel {
overflow: hidden;
padding: 0 0 10px 0;
margin: auto;
display: flex;
}

.debug-timetravel-panel-slider {
padding: 0;
flex: 8;
}

.debug-timetravel-panel-button {
padding: 0;
border: 0;
background: none;
flex: 1;
color: #fff;
font-size: 12px;
}

.debug-timetravel-panel-button:hover {
text-decoration: underline;
}

.debug-timetravel-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 15px;
position: absolute;
background: none;
color: #fff;
}

.debug-timetravel-button:hover {
text-decoration: underline;
}

.debug-treetype-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 85px;
position: absolute;
background: none;
color: #fff;
}

.debug-treetype-button:hover {
text-decoration: underline;
}

.connecting {
font-size: 15px;
color: #999;
Expand All @@ -1436,11 +1331,13 @@ button.action-button:disabled {

.toolbar {
display: flex;
margin-bottom: 1px;
/* margin-bottom: 1px; */
background: #fff;
padding: 4px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border: #eee 1px solid;
border-bottom-width: 0px;
vertical-align: middle;
overflow: auto;
height: 36px;
Expand Down
79 changes: 0 additions & 79 deletions packages/svelte-lexical/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,6 @@ body {
width: 100%;
}

pre {
line-height: 1.1;
background: #222;
color: #fff;
margin: 0;
padding: 10px;
font-size: 12px;
overflow: auto;
max-height: 400px;
}

.tree-view-output {
display: block;
background: #222;
color: #fff;
padding: 0;
font-size: 12px;
margin: 1px auto 10px auto;
position: relative;
overflow: hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

pre::-webkit-scrollbar {
background: transparent;
width: 10px;
Expand Down Expand Up @@ -1327,61 +1303,6 @@ button.action-button:disabled {
}
}

.debug-timetravel-panel {
overflow: hidden;
padding: 0 0 10px 0;
margin: auto;
display: flex;
}

.debug-timetravel-panel-slider {
padding: 0;
flex: 8;
}

.debug-timetravel-panel-button {
padding: 0;
border: 0;
background: none;
flex: 1;
color: #fff;
font-size: 12px;
}

.debug-timetravel-panel-button:hover {
text-decoration: underline;
}

.debug-timetravel-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 15px;
position: absolute;
background: none;
color: #fff;
}

.debug-timetravel-button:hover {
text-decoration: underline;
}

.debug-treetype-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 85px;
position: absolute;
background: none;
color: #fff;
}

.debug-treetype-button:hover {
text-decoration: underline;
}

.connecting {
font-size: 15px;
color: #999;
Expand Down
67 changes: 67 additions & 0 deletions packages/svelte-lexical/src/lib/core/plugins/TreeView/TreeView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.tree-view-output {
display: block;
background: #222;
color: #fff;
padding: 0;
font-size: 12px;
margin: 1px auto 10px auto;
position: relative;
overflow: hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

.debug-timetravel-panel {
overflow: hidden;
padding: 0 0 10px 0;
margin: auto;
display: flex;
}

.debug-timetravel-panel-slider {
padding: 0;
flex: 8;
}

.debug-timetravel-panel-button {
padding: 0;
border: 0;
background: none;
flex: 1;
color: #fff;
font-size: 12px;
}

.debug-timetravel-panel-button:hover {
text-decoration: underline;
}

.debug-timetravel-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 15px;
position: absolute;
background: none;
color: #fff;
}

.debug-timetravel-button:hover {
text-decoration: underline;
}

.debug-treetype-button {
border: 0;
padding: 0;
font-size: 12px;
top: 10px;
right: 85px;
position: absolute;
background: none;
color: #fff;
}

.debug-treetype-button:hover {
text-decoration: underline;
}
Original file line number Diff line number Diff line change
Expand Up @@ -752,3 +752,16 @@
</div>
{/if}
</div>

<style>
pre {
line-height: 1.1;
background: #222;
color: #fff;
margin: 0;
padding: 10px;
font-size: 12px;
overflow: auto;
max-height: 400px;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import './TreeView.css';
import TreeView from './TreeView.svelte';
</script>

Expand Down

0 comments on commit 8137c4c

Please sign in to comment.