You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have two properties that influence how parts of the border are drawn. border-limit allows to specify which parts of a border to draw (everything or only specific sides or only the corners).
The border-clip-* properties allow to clip specific parts of the border after drawing it.
That's also outlined as an issue in the spec.
Here are two proposals for doing this: the second one is from GCPM, the first one is an attempt to recast it more readably. The names are terrible, known problem, proposals accepted. There is a problem with conceiving this as clipping: if you have dotted borders, you want whole dots always, not parts of dots. So it should be a drawing limit, not a clip.
As they are covering similar use cases, I suggest we merge the features of border-limit into border-clip-*.
Where sides clips the sides up to but not including the corners and corners clips the corners.
Clipping is obviously the opposite of of limiting the drawing, though with the above authors can achieve the same effects as border-limit.
Here are examples for how the syntax above covers the use cases of border-limit:
If we want to use keywords, we need to discuss their names, because border-clip-top: sides sounds wrong.
The name is still up for bikeshedding, of course. As the spec. issue notes, authors probably don't actually want real clipping when using non-solid border styles. Though simple clipping is presumably much faster than an algorithm that takes the style into account.
Sebastian
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Currently, we have two properties that influence how parts of the border are drawn.
border-limit
allows to specify which parts of a border to draw (everything or only specific sides or only the corners).The
border-clip-*
properties allow to clip specific parts of the border after drawing it.That's also outlined as an issue in the spec.
As they are covering similar use cases, I suggest we merge the features of
border-limit
intoborder-clip-*
.The syntax would then be
Where
sides
clips the sides up to but not including the corners andcorners
clips the corners.Clipping is obviously the opposite of of limiting the drawing, though with the above authors can achieve the same effects as
border-limit
.Here are examples for how the syntax above covers the use cases of
border-limit
:border-clip: normal
=border-limit: all
border-clip: sides
=border-limit: corners
border-clip: corners
=border-limit: sides
border-clip-top: 100%; border-clip-right: 100%; border-clip-bottom: 100%;
=border-limit: left
border-clip: 0 1fr 50% 1fr
=border-limit: sides 50%
Even without introducing the
sides
andcorners
keywords, authors could achieve the same effect when they know the border radius. E.g.border-clip: var(--border-radius) 1fr
=border-limit: corners
border-clip: 0 var(--border-radius) 1fr
=border-limit: sides
If we want to use keywords, we need to discuss their names, because
border-clip-top: sides
sounds wrong.The name is still up for bikeshedding, of course. As the spec. issue notes, authors probably don't actually want real clipping when using non-solid border styles. Though simple clipping is presumably much faster than an algorithm that takes the style into account.
Sebastian
The text was updated successfully, but these errors were encountered: