Ionic 2: Remove gigantic padding from form elements

Viewed 7088

Q) I have the following page grid structure and i want to remove the padding around everything so that it's not so huge. Is there a nice way to do this that doesn't ruin all the Ionic styling out of the box?

Here's the structure:

<ion-content>
  <ion-row baseline>
    <ion-col width-90>
      <ion-item>
        <ion-label stacked>Email</ion-label>
        <ion-input type="text"></ion-input>
      </ion-item>
    </ion-col>
    <ion-col width-10>
      <ion-icon name='more'></ion-icon>
    </ion-col>
  </ion-row>
  <ion-row baseline>
    <ion-col width-90>
      <ion-item>
        <ion-label stacked>Floor</ion-label>
        <ion-select item-right>
          <ion-option value="nes">NES</ion-option>
          <ion-option value="n64">Nintendo64</ion-option>
          <ion-option value="ps">PlayStation</ion-option>
          <ion-option value="genesis">Sega Genesis</ion-option>
          <ion-option value="saturn">Sega Saturn</ion-option>
          <ion-option value="snes">SNES</ion-option>
        </ion-select>
      </ion-item>
    </ion-col>
    <ion-col width-10>
      <ion-icon name='more'></ion-icon>
    </ion-col>
  </ion-row>
</ion-content>

Which looks like this:

enter image description here

Thanks.

2 Answers

If you don't want to override styles in a global fashion, just add a no-padding attribute to the element in question ala <ion-grid no-padding>...

Safari Elements screen shot

Related