-
Notifications
You must be signed in to change notification settings - Fork 71
Allow width, height, and valign attributes on img tags #50
Conversation
Note: I added and then removed |
Looks good to me. I don't have commit bit on this repo any more, though. |
Thanks, @zeke! We'll see! 👍 |
@othiym23 Can someone merge this? It's annoying that logos and stuff goes fullwidth. Examples: |
This isn't a code base I have a lot of contact with, so it would be better for @rockbot, @jefflembeck, or @aredridel to take a look at landing this one. It may be a bit, too, as they're heads down right now. |
@soldair would be a good person to reach out to as well, he's working on patching some dependencies of the library right now. |
An additional note, GitHub applies a |
@sindresorhus perhaps already in place? See: https://github.com/npm/newww/blob/master/assets/styles/markdown.styl#L63 |
lgtm - ill check this out after i resolve another issue |
👍 |
Any progress on this @soldair? Particularly bad case below. npm: github: |
LGTM too. Our max-width is already 100% so good to go. |
Allow width, height, and valign attributes on img tags
🎉 thanks! |
The inspector and a search (link above) suggested that markdown.styl in npm/newww contains the max-width property in question. I'd do a bit more sleuthing and track down the fix, but that's my best guess for what we're talking about. Am I misunderstanding the level on which this needs to happen? |
Oops. Slow on the comment. 😄 |
Thanks for the merge! 👻 |
You're welcome! We'll roll this out with the next updates, probably! |
I filed an issue (in hindsight, for the wrong repo) at npm/newww#1107. In short width, height, and valign attributes are allowed on github and disallowed on npmjs.com which makes it rather difficult to achieve visual consistency between the two.
Some examples:
Basically any image with a fixed width and height loses it when published to npm (i.e. the only non-css way to use retina images—and I'd use SVG except SVG has its own issues on github). I know this will affect the look of quite a few READMEs on npm so I don't take this lightly, but I think there's a pretty good argument to be made that will only fix visual inconsistencies rather than creating them since it's not clear why you'd set these attributes and prefer that they not be obeyed.
Tests are added. I can't think of any other issues like security that this would interfere with.
Thanks for your consideration!