I feel that width meaning the entire width is more intuitive. Also, it seems
to not be less powerful.

rm

On 12/28/07, why the lucky stiff <[EMAIL PROTECTED]> wrote:
>
> Hey, everyone, I could use some help deciding if the current
> strategy for widths and margins is working or not.
>
> == HTML's Box Model ==
>
> To determine total width for a box, HTML uses the following
> equation:
>
>   width = margin-left + border-left-width + padding-left + width +
>     padding-right + border-right-width + margin-right
>
> You're probably already familiar with this.  But it's all described
> here: <http://jessey.net/simon/articles/003.html>
>
> An example would be:
>
>   <div style="width: 100px; margin: 10px; border: 10px">
>     <p>Ragtime is poised to make a serious comeback.</p>
>   </div>
>
> == Shoes' Box Model ==
>
> In Shoes, the "width" of a box is its actual total pixel width,
> including margins and borders.  So the equivalent to the above in
> Shoes would be:
>
>   stack :width => 140, :margin => 10, :border => 10
>     para "Ragtime is poised to make a serious comeback."
>   end
>
> Now, this is confusing.  See ticket #80 for example:
> <http://code.whytheluckystiff.net/shoes/ticket/80>
>
> But it's also simpler in a way, since you can clearly see the width
> of the box without needing to calculate it mentally.
>
> == So What Stays? ==
>
> I need your help smoothing this out.  Shoes deviates from HTML in
> the following ways:
>
> * Width encompasses the entire perimeter of a box, including
>    widths and margins.  HTML width only covers content width.
> * Shoes has no padding.
> * Borders and backgrounds begin at the edges of the content
>    area (since they are actual Shoes elements).  In HTML,
>    borders surround the content area and ultimately pad the
>    width as they grow.
>
> I'm looking for pros and cons.  The obvious benefit to using HTML's
> approach is a lower learning curve for many people, but I also think
> the approach with the most merit should prevail.  Can I tweak this
> so it's not such a stretch?  Is this even much of a problem?
>
> Still, as I've been writing this, I've become more convinced that
> the way I've got it is very close.  Padding could prove handy, but
> I'm reluctant to just toss it in.
>
> _why
>

Reply via email to