@mdn/bob
Version:
Builder of Bits aka The MDN Web Docs interactive examples, example builder
134 lines (113 loc) • 2.19 kB
CSS
.editor,
.output {
font-size: 14px;
}
.editor {
position: relative;
margin-bottom: 0.5rem;
}
.output {
position: relative;
display: inline-block;
background-color: var(--background-secondary);
margin: 0;
padding: 0.8em;
border: 1px solid var(--border-primary);
border-radius: var(--elem-radius);
width: 100%;
height: 120px;
font: var(--type-code-regular);
}
.output code {
width: 100%;
height: 100px;
white-space: pre;
vertical-align: middle;
word-break: break-word;
overflow-y: auto;
}
.buttons-container {
display: inline-block;
width: 100px;
vertical-align: top;
}
.button {
display: block;
background-color: var(--button-secondary-default);
color: var(--text-primary);
padding: 0.5em;
border: 1px solid var(--border-primary);
border-radius: var(--elem-radius);
width: 100px;
font: var(--type-emphasis-m);
cursor: pointer;
}
.button:hover {
background-color: var(--button-secondary-hover);
}
.js .editor {
min-height: 280px;
}
.cm-editor {
height: 280px;
}
.js .editor.taller,
.js .editor.taller .cm-editor {
height: 490px;
}
.js .editor.shorter,
.js .editor.shorter .cm-editor {
height: 200px;
min-height: 200px;
}
.wat .editor {
margin-bottom: 5px;
}
.wat .editor.taller,
.wat .editor.taller .cm-editor {
height: 420px;
min-height: 420px;
}
.wat .editor.standard,
.wat .editor.standard .cm-editor {
height: 210px;
min-height: 210px;
}
.wat .editor.shorter,
.wat .editor.shorter .cm-editor {
height: 140px;
min-height: 140px;
}
.buttons-container {
display: flex;
gap: 0.5rem;
justify-content: space-between;
align-self: flex-start;
width: 100%;
padding-bottom: 0.5rem;
}
.output-container {
display: flex;
align-items: center;
flex-direction: column;
}
.output {
display: flex;
flex: 10 150px;
align-items: center;
}
@media screen and (min-width: 590px) {
.output-container {
flex-direction: row;
}
.output {
width: calc(
100% - 108px
); /* 108px is 100px of a .button width + 8px of a .buttons-container padding-right */
}
.buttons-container {
flex-direction: column;
width: auto;
padding-right: 8px;
}
}