Fixing CSS positioning and scaling
Posted
by Louis
on Stack Overflow
See other posts from Stack Overflow
or by Louis
Published on 2010-06-02T13:37:17Z
Indexed on
2010/06/02
13:54 UTC
Read the original article
Hit count: 185
I was contemplating writing a UI toolkit where setting the position and size of an element/widget was intuitive and powerful. Here are some examples of how it would be used (not currently implemented):
ui("Panel").size(". 40").pos("0 0").attach(element);
ui("Textarea").size(". %-10").pos("0 40").attach(element);
ui("Panel").size(". 10").pos("0 bottom+5");
Where .
means auto
, %
means 100%
and the possibility to add pixels to percentages.
Does anything like said exist (even as a jQuery plugin or something)? Somethings just aren't possible with pure CSS.
© Stack Overflow or respective owner