Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using iconic in bootstrap buttons #34

Open
akiross opened this issue Feb 21, 2018 · 5 comments
Open

Using iconic in bootstrap buttons #34

akiross opened this issue Feb 21, 2018 · 5 comments

Comments

@akiross
Copy link

akiross commented Feb 21, 2018

Hello,
today I tried to use open-iconic inside a button in bootstrap v4. Problem is: when applying the class .oi, the button is slightly shifted downward (.oi has top: 1px in it). This is a bit of a problem when using .input-group-append or .input-group-prepend.

Example fiddle produces the following image (note the button shifted downward)

open-iconic-shift

I also tried placing the text inside a <span> element, but this would raise another set of issues while using bootstrap. So, I merely added a CSS rule to my stylesheet:

.oi { top: 0px; }

This being said, I don't understand the purpose of having 1px offset on .oi classes, but I am suspecting that I should not be using things in this way, or that open-iconic shall remove that offset when used inside a button.

Thanks
best regards

@KlomDark
Copy link

KlomDark commented Nov 21, 2018

I was able to fix it by changing it to:

.oi { margin-top: -1px; margin-bottom: 1px; }

See fiddle here

@dan-giddins
Copy link

I also have this issue! I have no idea why this is like this and it feels like the result of a hack somewhere to make something else work?
image
I think I will open a PR to have this fixed!

@dan-giddins
Copy link

Raised PR #55 to fix this

@e-coeur
Copy link

e-coeur commented Dec 23, 2021

Same problem open-iconic with django-bootstrap4.
"top: 1px" T_T

@dan-giddins
Copy link

@e-coeur There doesn't seem to be any activity on this project, so I recommend just pulling and using my fix in my PR #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants