Giter Site home page Giter Site logo

Comments (6)

passananteg avatar passananteg commented on August 25, 2024 8

If you add the class d-flex on a button you can add the class align-items-center to the icon and it will be aligned to the middle

from icons.

mariusa avatar mariusa commented on August 25, 2024 3

The fix that works for me is moving the icons slightly up, not more down:

 vertical-align: 0.125em;

Original bootstrap 4.x, no change, using icon font 1.3.x
Screenshot from 2021-01-20 17-37-20

With vertical-align: 0.125em;
Screenshot from 2021-01-20 17-37-27

from icons.

kanine avatar kanine commented on August 25, 2024 2

This issue still seems present in 1.5.0 release where an inline SVG is not correctly aligning with text. It appears to be due to the vertical-align being overridden by the definition in _reboot.scss

img, svg { vertical-align: middle; }

This is taking precedence over the icons.css.

As a work around I've been including this style in my projects.
svg.bi {vertical-align: -0.125em;}

image
vs
image

from icons.

mdo avatar mdo commented on August 25, 2024

Reminded of this after #601. Seems I need to revisit this and wouldn't mind any help or additional recommendations :).

from icons.

mdo avatar mdo commented on August 25, 2024

Opened #701 to address it.

from icons.

blackblather avatar blackblather commented on August 25, 2024

Same happening to me.

Also found this workaround in the stylesheet for the headers example (in headers.css file) from the examples page page.

Why not just add it to the official bootstrap 5 css?
Am I missing something? Would it break something to add it by default?

from icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.