Ionic-framework: `$text-input-md-background-color` (and equivalents) not applied

Created on 26 Apr 2017  路  9Comments  路  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[X ] 3.x

I'm submitting a ... (check one with "x")
[X ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I'm trying to override the background color of the inputs in my app by changing the $text-input-md-background-color (and ios equivalent) sass variables but it doesn't seem to apply. I've changed the $list-md-background-color to a dark grey and want to change the inputs to white but they are the same color as the list background. Doing a search for the variables in the source code shows it only appears in its definition. https://github.com/driftyco/ionic/search?utf8=%E2%9C%93&q=text-input-md-background-color&type=Code

Expected behavior:
Changing the variable should apply to the inputs.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed
v3

Most helpful comment

Bump - this looks like it hasn't been fixed since it was mentioned 馃槩

All 9 comments

Hello, thanks for using Ionic. Could you post a plunker or repo we can use to reproduce this issue?

I've created a repo with an example. If you go to the Sign Up section on the app you'll see that the input background colors are not being applied. This commit has the only change I made to the project, see the variables at the bottom variables.scss:
https://github.com/Iyashu5040/ionic-conference-app/commit/810a2574d07f6757db15a24ca546353f934c2c58

Bump - this looks like it hasn't been fixed since it was mentioned 馃槩

:/

I think OP @Iyashu5040 is correct. Looking at v3.9.2 the $text-input-ios-background-color variable is also only ever declared and not used.

my workaround is to add this is app.scss (will be applyed to all textboxes)...

ion-input { background: rgba($color: white, $alpha: 0.18) !important; }

I havent yet tested it on ios

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giammaleoni picture giammaleoni  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

daveshirman picture daveshirman  路  3Comments

fdnhkj picture fdnhkj  路  3Comments

alexbainbridge picture alexbainbridge  路  3Comments