diff --git a/control_panel.css b/control_panel.css index 8ea52ea..70abfe0 100644 --- a/control_panel.css +++ b/control_panel.css @@ -8,7 +8,7 @@ } .control-panel > .module { background-color: var(--module-bg, silver); - border: 1px var(--module-border, solid black); + border: var(--module-border-size, 1px) var(--module-border, solid black); border-radius: 10px; padding: 5px; grid-template-columns: 3fr 1fr; @@ -19,21 +19,24 @@ .control-panel > .module[title] { border-radius: 0 10px 10px 10px; } -.control-panel > .module.half-controls { +.control-panel > .module.even-controls { grid-template-columns: 1fr 1fr; } +.control-panel > .module.auto-controls { + grid-template-columns: auto auto; +} .control-panel > .module > div:not(:last-child) { border-radius: 10px; margin-right: 5px; } .control-panel > .module[title]::before { background-color: var(--module-bg, silver); - border: 1px var(--module-border, solid black); - border-bottom: 0px; + border: var(--module-border-size, 1px) var(--module-border, solid black); + border-bottom: 0; content: attr(title); font-size: 20px; - margin-top: -30px; - margin-left: -6px; + margin-top: calc(var(--module-border-size, 1px) * -1 - 29px); + margin-left: calc(var(--module-border-size, 1px) * -1 - 5px); padding: 0 15px; padding-bottom: 1px; display: block; @@ -48,8 +51,8 @@ border-radius: 12px; column-gap: 1px; row-gap: 1px; - border: 1px solid var(--border-color, black); - background-color: var(--border-color, black); + border: 1px solid var(--button-border-color, black); + background-color: var(--button-border-color, black); } .four_buttons > button { font-size: 15px; @@ -74,7 +77,7 @@ display: flex; flex-direction: column; border-radius: 12px; - border: 1px solid var(--border-color, black); + border: 1px solid var(--button-border-color, black); } .buttons_v > button { margin: 0px; @@ -84,7 +87,7 @@ flex-grow: 1; } .buttons_v > button:not(:last-child) { - border-bottom: var(--spacing, 1px) solid var(--border-color, black); + border-bottom: var(--button-spacing, 1px) solid var(--button-border-color, black); } .buttons_v > button:first-child { border-top-left-radius: 10px; @@ -98,7 +101,7 @@ display: flex; flex-direction: row; border-radius: 12px; - border: 1px solid var(--border-color, black); + border: 1px solid var(--button-border-color, black); } .buttons_h > button { margin: 0px; @@ -107,7 +110,7 @@ border: 0px; } .buttons_h > button:not(:last-child) { - border-right: var(--spacing, 1px) solid var(--border-color, black); + border-right: var(--button-spacing, 1px) solid var(--button-border-color, black); } .buttons_h > button:first-child { border-top-left-radius: 10px; diff --git a/index.css b/index.css new file mode 100644 index 0000000..ed06cf8 --- /dev/null +++ b/index.css @@ -0,0 +1,29 @@ +div.module[hidden] { + display: none; +} +body { + font-size: 15px; +} +style[contenteditable] { + display: block; + background-color: white; + border-radius: 10px; + padding: 10px; +} +#horizontal-buttons::before { + text-orientation: mixed; + writing-mode: vertical-lr; + line-height: 20px; + max-height: 15px; + padding-top: 5px; + padding-bottom: 10px; +} +pizza { + background-color: peru; +} +pizza:hover { + background-color: yellow; +} +pizza:active { + background-color: red; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..a3386a1 --- /dev/null +++ b/index.html @@ -0,0 +1,155 @@ + + + + + + + +
+
+ This is a module!
+ Actually, this is the content div of a module
+ A module has two divs: a content div and a control div.
+ There's nothing to tag, just make two divs.
+ They're just the first and second div in a .module
+
+
+ +
+
+ + + + + + + + + + + + + diff --git a/index.js b/index.js new file mode 100644 index 0000000..e53b3d9 --- /dev/null +++ b/index.js @@ -0,0 +1,30 @@ +function unhide(i) { + document.body.children[i].hidden = false +} +function toggle(id) { + document.getElementById(id).hidden = !document.getElementById(id).hidden +} +function hide(i) { + document.body.children[i].hidden = true +} +function hide_all() { + for (i = 1; i < document.body.children.length-1; i++) { + hide(i) + } +} +function reset_color_style() { + document.getElementById("color_style").innerHTML = ".module[title=Colors] {\n --module-bg: silver;\n --module-border-size: 1px;\n --module-border: solid black;\n}" +} +function add_button(id, i) { + document.getElementById(id).innerHTML += "\n" +} +function reset_buttons(id, i) { + document.getElementById(id).innerHTML = "