question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input field underline missing when inside ion-card

See original GitHub issue

**Ionic version: 3.2.1

**I’m submitting a Bug Report

Current behavior: When I put an <ion-input> inside an <ion-card> The bottom border that acts as an underline is being overwritten with some core css found here when using the md or default modes.

.card-md .item-md.item-block .item-inner {
  border: 0;
}

The password field has a border but only because it is also the last child of a list. screen shot 2017-05-12 at 4 17 29 pm

Code to produce:

<ion-card class="contentBox">
            <ion-card-header>
              <h3>Login</h3>
            </ion-card-header>
            <ion-card-content>
            <ion-list>
              <ion-item>
                <ion-label floating>Email</ion-label>
                <ion-input type="email"></ion-input>
              </ion-item>
              <ion-item>
                <ion-label floating>Password</ion-label>
                <ion-input type="password"></ion-input>
              </ion-item>
            </ion-list>
            </ion-card-content>
</ion-card> <!-- contentBox -->

Expected behavior: Should leave the underline intact Plunker: http://plnkr.co/edit/hSbLqd?p=preview

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:22 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
iget-mastercommented, Jul 3, 2017

While ionic-team doesn’t fix it, the following rules could be added to your app.scss to fix it:

//@todo: Remove after Issue ionic-team/ionic#11640 is fixed
.card-md .item-md.item-block:not(:last-child) .item-inner {
  border-bottom: 1px solid #dedede;
}

.card-md .item-md.item-block:not(.item-input):not(.item-select):not(.item-radio):not(.item-checkbox) .item-inner {
  border: 0;
}
5reactions
reyco1commented, Dec 28, 2017

This worked for me. I just placed it in my page’s scss file:

.card-md .item-inner { border-bottom: 1px solid #dedede !important; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input field underline missing when inside ion-card #11640
Ionic version: 3.2.1 **I'm submitting a Bug Report Current behavior: When I put an inside an The bottom border that acts as an...
Read more >
Input - underline is not showing when field is not selected
Are there any quick way to display underline in input field not only on select, but all the time? [image][image]
Read more >
Ionic: Remove line under a field - Stack Overflow
Ionic is making line below after each field I am creating. how can I remove this line? What this line thing “officially” called?...
Read more >
sec_E_SB_ELA_G7.pdf - TN.gov
observe the small details within a text in order to arrive at a deeper understanding of the whole ... Underline key words that...
Read more >
Computerized Patient Record System (CPRS) Technical Manual
Deletes the entry in the COLUMN WIDTH field of the listed protocols. ... Generic orders in CPRS can't use the same item within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found