Comments (9)
Having img { display: block;}
is way too opinionated, and will cause lots of problems. Images are considered inline content, although they have a width and a height. You can also put several of them on a singe line. I want to keep that default behaviour as much as possible.
Adding a vertical-align: top
could be possible, but trigger other problems.
from minireset.css.
vertical-align: text-bottom
might be the closest match to the default baseline
property without rendering the space underneath. https://developer.mozilla.org/en/docs/Web/CSS/vertical-align
from minireset.css.
Looks like a good candidate.
from minireset.css.
@jgthms could you implement it or would you accept a PR?
from minireset.css.
I think this issue can be avoided with any vertical-align
property, try vertical-align: middle;
from minireset.css.
But I still think something like this should be included. Anything that removes this weird issue is fine.
from minireset.css.
Hmm, I do understand that img { display: block;}
is to opinionated, but I feel providing an out of the box solution, whatever you would choose for it, would be good.
from minireset.css.
Harry Roberts uses a vertical-align
in his discovr repo, I think it's fairly safe to use in this context. https://github.com/thomasdigby/discovr/blob/master/css/elements/_elements.images.scss
from minireset.css.
vertical-align: middle
is not a good option as it breaks the natural flow of a paragraph of text:
The only options that would both remove the space at the bottom and leave an image readable in a block of text are:
vertical-align: sub;
vertical-align: text-bottom;
vertical-align: bottom;
Not sure what option is the best.
from minireset.css.
Related Issues (18)
- Make available via bower HOT 2
- Add bower support ? HOT 1
- add @charset "UTF-8"; ?
- [media] - max-width
- Instead .sass try to write .scss, can be more useful HOT 1
- Trouble linking HOT 3
- Block fix HOT 1
- Add a default background and color on :root? HOT 17
- iframe height auto HOT 5
- remove overflow-y: scroll from html
- *:before, *:after rules glitches MacOS Safari HOT 1
- Question about UL and OL HOT 2
- Considering logical props
- Minireset conflict with custom styles HOT 2
- Duplicate rules for textarea's margin HOT 1
- font-family on form fields
- Little fix to do on the README.md HOT 1
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 minireset.css.