-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add resizable editor/layout to playground #2296
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -301,11 +301,6 @@ pre code, | |
background-color: #fafafa !important; /* Color from one-light */ | ||
} | ||
|
||
.frame-body-box-fixed-height { | ||
height: 20rem; | ||
overflow-y: auto; | ||
} | ||
|
||
.frame-body-box { | ||
padding: calc(1em + 1ex); | ||
} | ||
|
@@ -764,8 +759,21 @@ button.success { | |
border-radius: 10px; | ||
} | ||
|
||
.frame-resizeable { | ||
display: flex; | ||
flex-direction: column; | ||
overflow: auto; | ||
|
||
min-height: 10rem; | ||
height: 24rem; | ||
resize: vertical; | ||
} | ||
|
||
.frame-tab-bar { | ||
flex-shrink: 0; | ||
display: flex; | ||
flex-direction: row; | ||
align-items: stretch; | ||
margin-block-start: calc(1em + 1ex); | ||
list-style-type: none; | ||
margin: 0; | ||
|
@@ -776,10 +784,6 @@ button.success { | |
.frame-tab-bar-scroll { | ||
overflow-x: auto; | ||
overflow-y: hidden; | ||
flex: 1; | ||
flex-direction: row; | ||
align-items: stretch; | ||
flex-grow: 1; | ||
mask-image: linear-gradient( | ||
to right, | ||
hsl(0deg 0% 100% / 30%), | ||
|
@@ -789,11 +793,54 @@ button.success { | |
); | ||
} | ||
|
||
.react-tabs__tab-panel { | ||
} | ||
|
||
.react-tabs__tab-panel--selected { | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
overflow: hidden; | ||
} | ||
|
||
/* Preview / Options */ | ||
.react-tabs__tab-panel--selected.tab-panel-scrollable { | ||
overflow: auto; | ||
} | ||
|
||
.frame-body { | ||
border-bottom-left-radius: 3px; | ||
border-bottom-right-radius: 3px; | ||
} | ||
|
||
.react-tabs__tab-panel--selected > .frame-body { | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This selector applies to the options, making them rather big There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh yes, this is because margin collapsing only applies to block and not flex There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
.react-tabs__tab-panel--selected:not(.tab-panel-scrollable) > .frame-body { | ||
overflow: hidden; | ||
} | ||
|
||
.frame-body > .playground-editor-code-mirror, | ||
.frame-body > pre { | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
overflow: hidden; | ||
} | ||
|
||
.frame-body > div > div.cm-editor { | ||
flex-grow: 1; | ||
overflow: hidden; | ||
} | ||
|
||
.frame-body > pre > code { | ||
overflow-x: auto; | ||
overflow-y: auto; | ||
} | ||
|
||
.frame-tab-bar + pre { | ||
margin-block-start: 0; | ||
} | ||
|
@@ -893,6 +940,10 @@ button.success { | |
background-color: var(--fg); | ||
} | ||
|
||
.playground-editor-options-tab-panel label { | ||
margin-block: 0.5em; | ||
} | ||
|
||
.playground-result-badge::after { | ||
content: attr(data-count); | ||
display: inline-block; | ||
|
@@ -923,11 +974,6 @@ button.success { | |
font-size: 1rem; | ||
} | ||
|
||
.ͼ1 .cm-scroller, | ||
.ͼ1 .cm-content { | ||
min-height: 20rem; | ||
} | ||
|
||
.ͼo { | ||
border-bottom-left-radius: 2px; | ||
border-bottom-right-radius: 2px; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 2 can now be more easily adjusted to define the initial height of the panels