royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: Label
Date Thu, 15 Mar 2018 19:19:10 GMT
Why is span lighter than div?

Inline and nowrap is not specific to span. AFAICT, there’s nothing specific to snap which
fits Label better than div.

As far as components which “does” span: Besides Span in HTML, we have HTMLText in Basic
which encapsulates span.

I can revert the change I made to Label, but I have not seen any downside to using div for
Label. It seems to me that there’s nothing in the Label promise which dictates using span.

Harbs

> On Mar 15, 2018, at 6:55 PM, Alex Harui <aharui@adobe.com.INVALID> wrote:
> 
> 
> 
> On 3/15/18, 5:34 AM, "Harbs" <harbs.lists@gmail.com> wrote:
> 
>> Gotcha. FWIW, we now have the HTML element component set which more
>> thinly wraps HTML elements.
>> 
>> I can’t think of any reason why Label would be better as a span than a
>> div. It seems to me that simply using div instead of span would make
>> Label more versatile. Am I missing something?
> 
> You may be missing that the only real goal of Royale is to encapsulate
> popular patterns.  Pretty sure I've seen span used on many web pages, so
> we need a component that does what it does, including assuming inline
> instead of block display.  Similarly, what would you think of a framework
> that had a HelloWorld that used a div instead of a span?  You might think
> it is too heavy.
> 
> Per PAYG, if span doesn’t' support certain features, then you create a
> LabelWithTruncation and have it use a Div if you need to.
> 
> My 2 cents,
> -Alex
>> 
>>> On Mar 15, 2018, at 2:30 PM, Peter Ent <pent@adobe.com.INVALID> wrote:
>>> 
>>> Label was one of the very first components and the idea was minimalism.
>>> Button was <button> and TextInput was <input type="text"> and Label
was
>>> <span>. 
>>> 
>>> I'm wondering if we should have NativeButton, NativeLabel, etc. which
>>> would be these minimal elements and have others that are <div> wrapping.
>>> For instance, ImageAndTextButton is a <button><img src="goo.jpg">Label
>>> Here</button> which works but the alignment is weird so maybe
>>> ImageAndTextButton should be a <div><img>Text</div> which can
be aligned
>>> and styled better.
>>> 
>>> Anyway, that's the reason: simplicity.
>>> 
>>> ‹peter
>>> 
>>> On 3/15/18, 7:51 AM, "Harbs" <harbs.lists@gmail.com> wrote:
>>> 
>>>> Is there a reason that the element type of Basic Label is span?
>>>> 
>>>> I tried adding a łTextOverflow˛ bead to a Label and it does not seem to
>>>> work because spans donąt really have a working width. Switching the
>>>> element type to div seems to make it work.
>>>> 
>>>> Harbs
>>> 
>> 
> 


Mime
View raw message