umpox / TinyEditor

A functional HTML/CSS/JS editor in less than 400 bytes
tiny-editor-umpox.vercel.app
MIT License
2.34k stars 154 forks source link

make smaller #5

Open pbhj opened 6 years ago

pbhj commented 6 years ago

I think you can switch out "textarea, iframe{ ...}" in the CSS for body>*{...} as it applies to all elements immediately below body, which is in this case all the textareas and the iframe.

Apologies if this is the wrong way to do a pull, or bad social form; I'm not really a coder.

notpushkin commented 6 years ago
*>*>*{width:100%;height:50%} /* html > body > * */
*{margin:0} /* suggested in #1 by @mstaniuk */
:valid{width:33.33%;font-size:18} /* textareas are always valid */
notpushkin commented 6 years ago

OK, even better! [id]{width:100%;height:50%} should do the trick too

pbhj commented 6 years ago

That's a good one @notpushkin, it's quite a while since I did active webdev, didn't recall that selector.

https://www.w3.org/TR/CSS2/selector.html#attribute-selectors