Split up borders into top-bottom-left-right? #88
Replies: 2 comments 2 replies
-
Hi @robrechtme Currently, we store borders according to this type. Could you show an example of the output you would like to have, please? |
Beta Was this translation helpful? Give feedback.
-
Hi @robrechtme, I think it's a great idea. We were looking into this and came to a realization that Figma does not allow to have different border-width so we decided to keep it simple for now. For the border-radius, we can already implement this and we've been thinking of a new way to store the data. radii: {
topLeft: {unit: 'px', measure: 16},
topRight: {unit: 'px', measure: 16},
bottomRight: {unit: 'px', measure: 16},
bottomLeft: {unit: 'px', measure: 16},
} Or have only a value when they're all the same and have an object if not. Considering that it would be the responsibility of the parser's developer to decide whether he has to use radii or radii.topLeft Would you want to have radii: MeasurementToken | {
topLeft: MeasurementToken,
topRight: MeasurementToken,
bottomRight: MeasurementToken,
bottomLeft: MeasurementToken,
} or radii: {
topLeft: MeasurementToken,
topRight: MeasurementToken,
bottomRight: MeasurementToken,
bottomLeft: MeasurementToken,
} Of course, the same logic would be applied to the border-width |
Beta Was this translation helpful? Give feedback.
-
As far as I understand it, borders tokens apply to each side and cannot be "split up" into top-bottom-left-right. Is that correct?
Splitting these up would be useful, especially for border-width and border-radius. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions