2 different paradigms

56 views
Skip to first unread message

Knu

unread,
Nov 1, 2012, 7:45:09 PM11/1/12
to axr-...@googlegroups.com
The default position of borders is currently center* which doesn't make sense if it refers to the borders of the current element. The expected position is obviously outside. But the borders are in fact relative to the shape's outline. In short they are treated like strokes.
If you think about it this way, the position for a stroke is centered on its line: the default makes perfect sense now.

There's also another thing to be aware of: borders aren't in flow so the surrounding elements aren't impacted by them. In short they are acting like outlines in CSS.

So I am asking you 2 things:
  1. assuming the default position remains center, should we rename the border property to stroke?
  2. assuming we don't rename it, should we change the default position to outside?

* that means that a 20px border has 10px inside the element (over the padding) and 10px outside.

Miro Keller

unread,
Nov 1, 2012, 7:53:33 PM11/1/12
to axr-...@googlegroups.com
Another option, of course, is that it might be perfectly fine as it is right now. I'm not sure that the box model of CSS will be assumed just because it uses the same name "border".

I'd like to hear opinions of you guys. My position is strongly towards the default being "centered", but Funcod might be right that we should rename it to border, what do you think?


Miro Keller

Founder - Head of Specification / Development - The AXR Project

veos...@gmail.com
http://twitter.com/veosotano
Skype: veosotano

I'll gladly answer any question about the project. Just shoot me a mail :)





Zisu Andrei

unread,
Nov 1, 2012, 8:00:08 PM11/1/12
to axr-...@googlegroups.com
I don't think it is a point of confusion as long at this clearly outlined in the documentation (not the fact that it's different from CSS, but the fact that it's centered). I think stroke has more meanings and can be a point of confusion compared to border.

Knu

unread,
Nov 1, 2012, 8:09:50 PM11/1/12
to axr-...@googlegroups.com
I disagree with that Andrei because I don't want to reset the borders to outside every time or having to add enough padding (or else it could go over the content). It's not just a doc default it has consequences (sometimes annoying or unexpected).

Ameen

unread,
Nov 1, 2012, 9:51:04 PM11/1/12
to axr-...@googlegroups.com
Why isn't the border the same as CSS, i.e., without any taking up any space inside the element? Padding & Border might get mixed up, and for others this might cause a few confusions. Calling it stroke might fix a few issues, but if it has been planned for another element, we need to find an alternative to this.

Knu

unread,
Nov 10, 2012, 3:02:46 AM11/10/12
to axr-...@googlegroups.com
On Friday, November 2, 2012 12:53:39 AM UTC+1, veosotano wrote:
…but Funcod might be right that we should rename it to border, what do you think?


Miro Keller
Nice lapsus there veosotano ^^

@ameen a border is defined in relation to its element. On the other hand a stroke only exists in relation to a path/line. So positioning a border relative to the shape's outline doesn't make any sense: a line doesn't have borders (well that's not how it's called).

There are 2 things to take into account:

1. an elements can have shapes: polygons bounded by a closed path
2. the most common use case will remain adding borders to an element

If you only consider 1. you would pick stroke/center but the logic dictates that AXR will be content-centric—not primarily made for drawing—hence 2. becomes essential: users add borders in relation to the content of an element (not his shape). And they obviously don't want their content masked by the borders (even if it can be avoided with appropriate padding) which means inside and center are not proper default values.
Reply all
Reply to author
Forward
0 new messages