Skip to content

Border style for images defaults to none? #362

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

Closed
joeybeninghove opened this issue Jan 24, 2018 · 1 comment
Closed

Border style for images defaults to none? #362

joeybeninghove opened this issue Jan 24, 2018 · 1 comment

Comments

@joeybeninghove
Copy link

I'm not sure if this is a recent change, but it looks like img elements have a default border-style set to none. In the comments for the generated CSS, it looks like this is only meant for IE 10, but it's being applied globally for all browsers.

(from the generated CSS)

/**
 * Remove the border on images inside links in IE 10-.
 */

img {
  border-style: none;
}

This is making it so you can't just apply border to img elements to get a border, but rather border border-solid. Not a huge deal, but it seems inconsistent with how borders are treated everywhere else.

Is there a particular reason borders are turned off by default for img elements?

@adamwathan
Copy link
Member

Interesting find! That style comes from Normalize, and what you’re seeing is how that is interacting with a new-ish part of our own reset here:

https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css#L533

I think the best fix is to just undo that Normalize style; our border-width: 0 reset should handle that.

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

2 participants