Re: [gcpm] border-parts

On Nov 6, 2008, at 6:27 AM, Håkon Wium Lie wrote:

> Also sprach Brad Kemper:
>>>
>> So my change to help simplify is to say that "repeat" would be for  
>> the
>> whole string of lengths, and not for substrings of lengths.
>
> It's not much simpler and it doesn't address the fundamental
> competition between the two: you would still have repeating patterns
> and fr units in the same border.
>
>>> The problem is the competition that appears between repeat and
>>> fractions. We think of fractions as eating up the leftover space.
>>> However, 'repeat' is also very good at eating leftovers and this  
>>> makes
>>> fractions go towards 0.
>>
>> True, but with repeated patterns I would really like to be able to
>> have dash patterns that line up on the corners nicely, preferably  
>> in a
>> way that was symmetrical on both ends.
>
> In the old prosal, you could to this with:
>
>  border-top: 20px 10px 0 1fr repeat(10px 10px 0 1fr) 0 10px 0 1fr  
> 20px;
>
> This would have given you 20px end parts, 10px middle parts, and 10px
> + equal flex between the visible parts.

I understand. But you wouldn't have that if you were to throw out  
"repeat" altogether. I was trying to find some middle ground between  
power and simplicity, to save what I thought was most important about  
repeat.

> The trick is to use "10px 0 1fr" to express "a flex with a minimum
> length of 10px".
>
>
> This is possibly useful.
>
> However, it's a bit cryptic

Yes, but when you introduced "repeat" and "fr", I was thinking of the  
same sort of solution as you for "minimum gap" as you before you  
posted it. So, that part wasn't that cryptic to me, or to the many  
others who are used to twisting CSS to get what they want. On the  
other hand, it could be made less cryptic, perhaps, by introducing  
some new units to mean "minimum pixels", etc. Then you could write  
that as "10min-px". And the previous example of minimum gap would be  
like this:

20px 10min-px

And then that would add space to the 10px gap as needed to square up  
the corners. Of course, this suggests a need for min-em, min-inch, min- 
cm, etc. Some people may balk at doubling the number of unit types in  
CSS, just for this property. Maybe a better solution would be a  
keyword to indicate where extra space should be distributed:

line-parts: 20px 10px, repeat space-gaps; /* add extra space to gaps */
line-parts: 20px 10px, repeat space-dashes; /* add extra space to  
dashes */
line-parts: 20px 10px, repeat; /* don't distribute space, just repeat  
clockwise until you run out of border */

> and I think it falls short of all the
> other things people would like to do if they could design their own
> "dashed" or "dotted" styles. Don't you want 3d effects, shadows,
> colors and gradiants on those border parts?

I don't know why this would prevent color from working. As for other  
border-style values, I really think that is not important. To me its  
like saying  "Don't you want bevel and dashed border-style at the same  
time?". We don't have that now, and I don't see why it is important to  
add that. It is more important to me to be able to use this to design  
my own border-style than it is to be able to combine border-style  
values, or to be able to apply them to the limited use cases of border- 
parts for footnotes.

> I don't think border-parts lends itself to these kinds of extenstions
> and I therefore think a separate proposal for CSS4 Borders and
> Backgrounds is better.

That may be so, but it seems wasteful to have two properties that are  
nearly identical in what they do, when one can kill both birds with  
one stone. I think having more control over dashes and dots would be  
much more important to most designers than to be able to generate  
short line segments that could also have other (non-dash, non-solid- 
looking) border styles. But if you could only work on one proposal at  
a time, and if it is necessary to separate this into two properties  
(one for dashes and one for dash-like border segments), then I would  
rather see us spending time on dashes in the CSS3 Borders &  
Backgrounds. Saying "CSS4" is kind of like saying "keep on waiting  
indefinitely; you won't get it any time soon".


>
>
> -h&kon
>              Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome

Received on Thursday, 6 November 2008 16:31:38 UTC