Need way to define width and height in CSS
Pedro Duque Vieira
pedro.duquevieira at gmail.com
Tue Jan 22 14:38:55 PST 2013
I'll press 2 :)
Right now the state of things is a bit strange, because you have to use
padding to define the width/height of regions.
Margins would also be a nice addition, I don't know whether insets already
cover the use case for margins but naming it margins would be more "css
On Tue, Jan 22, 2013 at 7:38 PM, Richard Bair <richard.bair at oracle.com>wrote:
> There are a few related issues that have come up over time, and I want to
> make sure we're on the same page. Some nodes have a width and height,
> other's don't. And for those that do, they aren't always a ResizableNode
> (like a Rectangle). If this is your issue, press 1. HTML CSS is a
> combination of visual and layout information. If your issue is that you
> would like to describe layout information from CSS, press 2.
> I assume you are interested in #2. If this is so, there are two things.
> First (http://javafx-jira.kenai.com/browse/RT-20906). This issue is
> basically asking to be able to set pref-width etc from CSS. I think this
> makes great sense. Also we want to be able to set Margins from CSS like we
> can do padding today. These things make sense and are just something that
> needs doing. But one thing that doesn't really make sense is "width:100%".
> Partly this is because our system is based on layout managers who are going
> to set the width / height based on the pref width / pref height etc. Partly
> this is because in HTML CSS, they only have one "layout manager" (box
> layout) and so some things which make sense in HTML CSS wouldn't in FX CSS
> when placed in some kind of layout container.
> We could do something more complicated, like "if width / height are set by
> anything other than a layout container, then the layout container won't set
> the width / or height." But that kind of hidden state is usually
> On Dec 11, 2012, at 3:50 PM, Pedro Duque Vieira <
> pedro.duquevieira at gmail.com> wrote:
> > Hi,
> > After some practice writing JavaFX CSS one thing as become clear: a way
> > clearly define a width and a height is lacking.
> > In standard w3c css you have width and height, on JavaFX CSS you have
> > padding - look at the way the size of the mark on a checkbox is defined
> > caspian. Padding isn't the nicest way to define this because it is
> > to define the spacing between an element and it's contents.
> > Cheers,
> > --
> > Pedro Duque Vieira
Pedro Duque Vieira
More information about the openjfx-dev