blob: ae95e16595cc7274d1fe0476cffa1cec2be5c019 [file] [log] [blame]
@use 'node_modules/codemirror/lib/codemirror.css';
@use 'node_modules/codemirror/theme/ambiance.css';
@use 'node_modules/codemirror/theme/base16-light.css';
@import '../../../elements-sk/modules/styles/select';
@import '../../../elements-sk/modules/styles/buttons';
@import '../themes/themes.scss';
.body-sk shaders-app-sk {
overflow: hidden;
display: block;
background: var(--background);
margin: 0;
min-height: 100vh;
--sidebar-width: 0;
--header-horiz-padding: 16px;
--secondary: var(--green-500);
header {
border-bottom: solid 1px var(--header-font-color);
}
main {
padding: 16px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
textarea {
display: block;
background: var(--surface);
color: var(--secondary);
font-family: var(--mono-font);
font-size: 16px;
resize: none;
margin: 0 8px 0 0;
}
button {
margin: 0;
}
.editButton,
.deleteButton,
.addButton {
border: none;
}
.linkish {
text-decoration: underline;
cursor: pointer;
}
p.childShader {
display: flex;
justify-content: space-between;
margin: 0;
padding-right: 8px;
color: var(--primary);
fill: var(--primary);
span {
font-family: var(--font);
}
}
/* This is the icon for the "add child shader" button */
add-icon-sk {
display: block;
svg {
width: 24px;
height: 24px;
}
}
#examples {
margin: 0 8px 8px 0;
font-size: 16px;
}
canvas {
margin: 0 16px 16px 0;
}
#codeEditor {
margin: 0 8px 8px 0;
font-size: 16px;
}
/* Debug, run, and save button */
#shaderControls {
margin-left: 0;
}
#uniformControls {
margin-left: 0;
}
#uniformControls>* {
padding: 0;
margin: 0 8px 8px 0;
}
#uniformControls uniform-mouse-sk {
padding: 0;
margin: 0;
}
#compileErrors {
h3 {
margin: 8px 0;
color: var(--error);
}
pre {
margin: 0 0 0 8px;
}
}
}
details[open] {
background: var(--surface);
margin: 8px 8px 8px 0;
}
details#shaderinputs {
/* Box containing shader input information */
display: initial;
padding: initial;
list-style: initial;
box-shadow: initial;
margin: 0 8px 8px 0;
font-size: 12px;
background: var(--background);
border: none;
textarea {
margin: 16px;
padding: 8px;
font-family: var(--mono-font);
font-size: 12px;
}
#imageSources {
display: flex;
align-items: flex-start;
margin: 8px;
figure {
margin: 0 8px 0 0;
display: flex;
flex-flow: column;
align-items: center;
img {
width: 32px;
height: 32px;
}
figcaption {
margin: 4px 0;
}
}
}
/* Shader input and edit icon label */
summary::-webkit-details-marker {
display: none;
}
}
details#image_edit {
margin: 0 8px 8px 0;
summary {
list-style: none;
margin-top: 0;
edit-icon-sk {
display: block;
svg {
width: 24px;
height: 24px;
}
}
}
}
details#image_edit[open] {
summary {
margin-top: 8px;
}
#image_edit_dialog {
border: solid var(--surface-2dp) 1px;
padding: 8px;
>* {
margin: 0 8px 8px 0;
}
}
label {
display: block;
margin: 0 8px 8px 0;
}
button {
margin: 0 0 0 8px;
}
input[type='url'] {
padding: 4px;
}
}
.CodeMirror {
height: 512px;
resize: both;
overflow: hidden;
* {
font-family: var(--mono-font);
font-size: 16px;
}
}
.example-gallery-and-canvas-wrapper {
display: flex;
}
/** Gallery template css */
.gallery {
width: 200px;
display: flex;
justify-content: center;
padding: 0 8px 8px 0;
.slides {
display: grid;
gap: 12px;
grid-auto-flow: row;
height: 512px;
list-style: none;
margin: 0 8px;
overflow-y: auto;
padding: 0 4px;
scroll-snap-type: y mandatory;
width: 140px;
.thumbnails {
display: flex;
flex-direction: column;
gap: 8px;
list-style: none;
cursor: pointer;
img {
border-radius: 8px;
height: 110px;
object-fit: fill;
scroll-snap-align: start;
width: 110px;
&:hover {
-webkit-transition: 0.3s ease-in-out;
opacity: 0.5;
transition: 0.3s ease-in-out;
}
}
}
}
}
}