#xqprtzcv
1 messages · Page 1 of 1 (latest)
Hello! I don't think we have an existing theme for that, but you should be able to do that (or get close) with the appearance API: https://stripe.com/docs/elements/appearance-api
OK, I will mess around with it more.
Thank you
I believe I would need to do something like this to hide the labels, but it doesn't seem to be working, any Idea what is wrong with that?
rules: {
'.Label': {
display: "none"
}
}
display isn't a supported property: https://stripe.com/docs/elements/appearance-api?platform=web#supported-css-properties
You can set the opacity on Label though.
As I am looking through this another, unrelated question arose. Is there some stripe element for saved addresses like the one displayed here:
No, there isn't.
OK, thats what I thought, just checking.
Is it possible with the appearance api to get a border radius on only the top corners and bottom corners of the address element (like in the first checkout screen shot I sent)?
Hi taking over for Rubeus as they had to step out
Can you describe a little more what you're trying to achieve?
You just want rounded corners around the address element?
Yes, but only on the first and last element like in the checkout screenshot above. Right now I am getting this:
With:
'.Block': {
borderRadius: "100px"
}
Looks like we support borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius, and borderTopRightRadius: https://stripe.com/docs/elements/appearance-api?platform=web#supported-css-properties. Should be able to control it that way I believe
I believe I would need some child selector to get just the first and the last, because it is still showing up on all of them.
to get that I added borderTopLeftRadius to the '.Input' rule
Can you share your current css?
Tbh not sure if you can just do it for the first and last input fields
Yeah, I don't think it is possible at this point, but this is what I have for my appearance object:
let appearance={
theme: 'stripe',
// labels: 'floating',
variables: {
colorPrimary: hexColors["green"],
colorBackground: "white",
colorText: hexColors["black"],
colorDanger: hexColors["red"],
// fontFamily: 'Futura, "Trebuchet MS", Arial, sans-serif',//'Ideal Sans, system-ui, sans-serif',
fontFamily: 'futura-pt, Arial, sans-serif',//'Ideal Sans, system-ui, sans-serif',
spacingUnit: px+'px',
borderRadius: 0*px/10+'px',
spacingGridColumn: 0,
spacingGridRow: 0,
// See all possible variables below
},
rules: {
'.Label': {
fontSize: "0",
lineHeight: "0",
margin: "0",
// fontWeight: '700',
},
'.Input': {
margin: "0",
// borderTopLeftRadius: "50px"
// fontWeight: '700',
}
}
};
Oh ok yeah won't be possible: ```.Tab .TabLabel, ancestor-descendant relationships in selectors are unsupported
From https://stripe.com/docs/elements/appearance-api?platform=web#all-rules
Ancestor descendent rules just aren't supported
Ok, thanks for your help