diff --git a/src/fancy_input.css b/src/fancy_input.css new file mode 100644 index 0000000..4ef9ce2 --- /dev/null +++ b/src/fancy_input.css @@ -0,0 +1,32 @@ + + +/* Label */ + +.inp.inp-fancy label { + position: absolute; + top: 7px; + left: 5px; + font-size: 1em; + font-weight: 700; + transform-origin: 0 0; + transform: translate3d(0, 0, 0); + transition: all .2s ease; + pointer-events: none; + background: var(--synergy-bg); + padding: 3px 8px; + border-radius: 10px; + line-height: 1.2em; + color: var(--synergy-label); + margin: var(--synergy-border-width); +} + +.inp.inp-fancy :is( + :is(input, textarea, select):not(:placeholder-shown) + label, + :is(input, textarea):not(:-ms-input-placeholder) + label, + :is(input, textarea):not(:-moz-placeholder-shown) + label +), +.inp.inp-fancy :is(input, textarea):focus + label { + color: var(--synergy-label-active); + transform: scale(.8); + top: -.7em; +} diff --git a/src/input.css b/src/input.css index b5e7cee..2030250 100644 --- a/src/input.css +++ b/src/input.css @@ -3,40 +3,9 @@ width: 100%; } -/* Label */ - -.inp label { - position: absolute; - top: 7px; - left: 5px; - font-size: 1em; - font-weight: 700; - transform-origin: 0 0; - transform: translate3d(0, 0, 0); - transition: all .2s ease; - pointer-events: none; - background: var(--synergy-bg); - padding: 3px 8px; - border-radius: 10px; - line-height: 1.2em; - color: var(--synergy-label); - margin: var(--synergy-border-width); -} - -.inp :is( - :is(input, textarea, select):not(:placeholder-shown) + label, - :is(input, textarea):not(:-ms-input-placeholder) + label, - :is(input, textarea):not(:-moz-placeholder-shown) + label -), -.inp :is(input, textarea):focus + label { - color: var(--synergy-label-active); - transform: scale(.8); - top: -.7em; -} - /* Common styles */ -.inp :is(input, textarea, select) { +.inp :is(input, textarea, select), .inp:is(input, textarea, select) { display: block; width: 100%; font-family: inherit; @@ -52,7 +21,7 @@ margin: 0px; } -.inp :is(input, textarea, select):focus { +:is(.inp :is(input, textarea, select), .inp:is(input, textarea, select)):focus { outline: none; border-color: var(--synergy-border-active); } @@ -79,8 +48,8 @@ pointer-events: none; } -.inp textarea { +.inp textarea, textarea.inp { height: 100px; max-width: 100%; resize: vertical; -} \ No newline at end of file +} diff --git a/web/components/Components.vue b/web/components/Components.vue index 7985f87..e8115ee 100644 --- a/web/components/Components.vue +++ b/web/components/Components.vue @@ -2,8 +2,7 @@ import { reactive } from 'vue'; import { Export, Result } from "../ts/Export"; -import { components } from "../ts/Synergy"; -import { variableValues, selectedComponents } from "../ts/Shared"; +import { variableValues, components } from "../ts/Shared"; let data = reactive({ results: [], @@ -16,7 +15,7 @@ interface Data { } async function exportCss() { - let exp = new Export(variableValues, selectedComponents); + let exp = new Export(variableValues, components); data.results = await exp.process(); data.vars = exp.vars; } @@ -45,7 +44,7 @@ function showVars() {
diff --git a/web/components/Preview.vue b/web/components/Preview.vue index bd192bf..b0052c9 100644 --- a/web/components/Preview.vue +++ b/web/components/Preview.vue @@ -2,17 +2,17 @@
-
+
-
+
-
+
@@ -67,21 +67,6 @@
-
- - - -
-