Skip to content
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

Input box renders oddly in Firefox (offending CSS block identified) #10252

Closed
jml6m opened this issue Aug 28, 2013 · 15 comments · Fixed by #10265
Closed

Input box renders oddly in Firefox (offending CSS block identified) #10252

jml6m opened this issue Aug 28, 2013 · 15 comments · Fixed by #10265

Comments

@jml6m
Copy link

jml6m commented Aug 28, 2013

Here is a JSFiddle (open in Firefox): http://jsfiddle.net/aLaXs/

Notice the odd, ugly shadowing effect that's applied only in Firefox browsers. Offending CSS block is this:

button, input, select[multiple], textarea {
    background-image: none;
}

By disabling this effect using Firebug or similar software, the text box looks normal again. Is there a workaround for this? I'm trying to add other attributes to my style.css to counteract this effect, but nothing seems to be working. I've tried adding:

//in style.css
input {
    outline: 0;
    border: 0;
    background-image: initial;
}

None of them has worked. Text box looks normal in other browsers.

@fchiumeo
Copy link

add form-control to input

Bootstrap Doc

Individual form controls automatically receive some global styling. All textual , <textarea>, and elements with .form-control are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

@jml6m
Copy link
Author

jml6m commented Aug 28, 2013

That does work, but not necessarily efficient if I don't want the other style attributes that come with that (i.e. if I don't want width: 100%)

@fchiumeo
Copy link

if you set a col-[xs-sm-md-lg]-* to div ?

what context want to use input ?

@cvrebert
Copy link
Collaborator

That CSS fragment was added to fix #8702.
@jml6m Which OS are you using?

@jml6m
Copy link
Author

jml6m commented Aug 28, 2013

@fchiumeo I use it in a variety of contexts, I don't want any of my inputs having the weird shadow effects
@cvrebert Windows 8 Pro 64-bit, Firefox 23.0.1 browser

@cvrebert
Copy link
Collaborator

Confirmed on Mac Firefox. Dammit Fennec!
/cc @mdo

@tagliala
Copy link
Contributor

So?

background-image: none in form-control and btn?

@zlatanvasovic
Copy link
Contributor

Use:

@media (max-width: @screen-sm-max) {
  button,
  input,
  select[multiple],
  textarea {
    background-image: none;
  }
}

instead of:

button,
input,
select[multiple],
textarea {
  background-image: none;
}

It'll just target mobile devices (phones and tablets), no desktop.

@tagliala No, .form-control is also for inputs.

@tagliala
Copy link
Contributor

@zdroid I don't like your solution because it is based on screen size

It should be fine adding that property to form-control because this issue only happens in unstyled controls: http://jsfiddle.net/aLaXs/9/

@zlatanvasovic
Copy link
Contributor

kk

2013/8/28 Geremia Taglialatela [email protected]

@zdroid https://github.com/ZDroid I don't like your solution because it
is based on resolution

It should be fine because this issue only happens in unstyled controls:
http://jsfiddle.net/aLaXs/9/


Reply to this email directly or view it on GitHubhttps://github.com//issues/10252#issuecomment-23441794
.

Zlatan Vasović - ZDroid

@jml6m
Copy link
Author

jml6m commented Aug 28, 2013

@tagliala As I mentioned above, adding '.form-control' changes other CSS properties of the , which may not be desired. I get that it may not be best practice to exclude '.form-control', but surely there is a simpler solution?

@tagliala
Copy link
Contributor

@jml6m I didn't say that, sorry

I mean... a solution could be remove

button, input, select[multiple], textarea {
    background-image: none;
}

and add background-image: none; to form-control, so unstyled form inputs will not be affected by this bug.

This solution was also suggested by necolas: necolas/normalize.css#214 (comment)

@Merg1255
Copy link

Confirmed on Win FF23

@cvrebert
Copy link
Collaborator

No further confirmation is necessary!

@cvrebert cvrebert reopened this Aug 30, 2013
mdo added a commit that referenced this issue Aug 31, 2013
fix #10252 by restricting Android Firefox reset to only .form-control & .btn
stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
@alenb
Copy link

alenb commented Sep 16, 2014

Hi all,

Has this issue been resolved at all? As it still persists in v3.2.0


Nvm, it seems adding padding creates a similar looking issue as the input control has a fixed height by default.

@twbs twbs locked and limited conversation to collaborators Sep 16, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants