Modification - lgVariant directive #1276
Replies: 4 comments 4 replies
-
We have the following designs from the Messaging Framework which might be enough to do the dev work: https://www.figma.com/file/iYCsbVcJuJxIDkruYvq2i2/SSOPT_Messaging-framework?type=design&node-id=453-126151&mode=dev |
Beta Was this translation helpful? Give feedback.
-
I agree with the proposed API as mentioned above 👍 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've completed a spike on this. Draft PR with link of deployment here: #1308 |
Beta Was this translation helpful? Give feedback.
-
Type of request
Modification
Component, pattern, template, helper or foundation?
Helper
Nature of request
We need a way of applying certain styles based on the background colour we want to use.
We believe that the current
lgVariant
directive should be a bit more flexible. At the moment we have styling forgeneric
,info
,success
,warning
anderror
. This was working fine for the previous scenarios but as we develop more designs it seems like we need a more flexible solution.@alexcanning and I have discussed the idea of having three new variants:
neutral
,light
anddark
:The buttons will need design (or will the current variants work?).
One issue I see is that none of the new variants will cover the old variants designs - e.g. in the previous ones the coloured one had coloured text while now, if we switch them to the
dark
varian, they will have charcoal text.How do we solve this? do we create a fourth variant that uses
rgba
colours for the text and links - e.g.Shade
?Proposal
The
lgVariant
should be updated to have aforeground
andbackground
input:foreground
will take the name of the variants (neutral
,light
ordark
- default will beneutral
);backround
will take the string value of a colour code/css variable (this cannot be a fixed colour because it will make branding complicated). The background will be optional.Initially, we will have these new variants working together with the old ones so that we don't create a breaking change. The old variants will be deprecated.
We will create a change in the
next
branch to remove the old deprecated variants.Beta Was this translation helpful? Give feedback.
All reactions