Comments (7)
Add flex class to the button like this:
<div class="btn btn-primary d-flex align-items-center">
A button <span class="gg-sort-az"></span>
</div>
from css.gg.
But what about in a div or p element? I cannot put flexbox everywhere.
Why it is display as block not inline anyway?
from css.gg.
This is designed to be as standalone as possible, you can create a class and add it to every icon where you need and overwrite the display, or you can
[class^="gg-"] {
display: inline-flex;
}
from css.gg.
Is there an easy way to unify all their size (same height) and alignment (align center)?
from css.gg.
Yes, you can just create a div with class .icon-wrapper
and then do t he following
.icon-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 24px;
height: 24px;
}
And then your markup would look like:
<div class="icon-wrapper>
<i class="gg-add"></i>
</div>
Also you can use the SVG version if don't like doing it with CSS.
from css.gg.
Did you eventually figure out how to do this in css only?
Having the same problem at the moment and im wondering why the css icons dont behave correctly.
Looks like this with astrits code:
from css.gg.
This can fix vertical alignment of the Format Bold
Icon:
margin-top: calc(-4px * var(--ggs));
Maybe @astrit can merge this, if approved.
from css.gg.
Related Issues (20)
- css.gg firefox bug for svg glyf-bar HOT 2
- Icon request: "help" and "warning"
- Icon request: Bluesky logo
- Icon request: Git family
- Vercel file is missing in the version 2.1.1 HOT 1
- Elpepd
- Icon Request: X (formerly Twitter)
- Incomplete Documentation for React
- VueJS wrapper for css.gg icons HOT 1
- Broken border-top icon HOT 2
- CSS transform causes --ggs var to not resize the icon HOT 1
- Icon Request: Command Palette HOT 1
- Mam slept
- Icon Requests: Platforms HOT 1
- Css.gg
- Bug: css.gg is empty HOT 1
- Adding text next to icon when using <i> results in a line break HOT 2
- Could not resolve "./tsx/Vercel" HOT 4
- Icon Request: Clapping Hands HOT 1
- Icons Request: enter fullscreen / exit fullscreen HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from css.gg.