Closed 0xpolarzero closed 2 years ago
@polar0 This is not a bug in RainbowKit; the alignment comes from your global.css
file where you set all buttons as flex and align items to center along the cross axis.
@polar0 This is not a bug in RainbowKit; the alignment comes from your
global.css
file where you set all buttons as flex and align items to center along the cross axis.
Oh yes... Thank you for your answer, and sorry for the wrong notice. I should have checked my own code before crying wolf š
Is there an existing issue for this?
RainbowKit Version
0.7.1
wagmi Version
0.6.7
Current Behavior
On the 'Connect a Wallet' window, the wallet providers are centered, which is not very elegant. In all demos (and documentation) it is aligned to the left, so the icons are vertically aligned. I've just installed rainbowkit with the dependencies, and updated my code according to the 'Installation' documentation. Here is how it looks like:
It happens with Chrome, Firefox, Safari. When catching the responsible CSS element with the debugger, here is what it says:
A quick way to get it back to left-align, is by just typing the following in the custom CSS file to override that weird behavior:
And it indeed gets it back to 'normal'.
Expected Behavior
The wallet providers icons should be aligned to the left, just as in the documentation. Or just like what's been achieved in the last picture of the previous section.
Steps To Reproduce
I don't know if this will do the same, since I've not managed to see this issue anywhere.
Install next-app:
Just keep the following in the return statement of
index.js
:(The
header
style in the CSS module is empty).Create a
Header.js
component, and import it in thatindex.js
Install rainbowkit, ethers, wagmi:
... which should install
Paste the following in that
Header.js
:export default function Header() { return ;
}
ALCHEMY_API_KEY
in a.env
file.Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
https://codesandbox.io/p/github/polar0/full-blockchain-solidity-course-js/csb-37q6ef/tree/main/999-nextjs-rainbowkit-bug?file=%2FREADME.md
Anything else?
You can just go to the codesandbox & run a new task:
I hope this will help to solve the issue. I guess it just needs
vertical-align: baseline
to be replaced withalign-items: baseline
atdiv.iekbcc0.ju367va.ju367v10.ju367v1i
.