Ionic-framework: v3 - bug - grid padding behaviour is wrong

Created on 24 Mar 2017  路  8Comments  路  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:
Having a normal grid (one row, one col - test), its padding is off the charts, even when I see it is just 5px.
image
I have many grids usages, and it happened only in 2 of them..

Expected behavior:
When removing the padding: 5px from the grid class:
image

As you can see, the difference is not 5px in each direction..

Related code:

<ion-grid>
    <ion-row>
        <ion-col>A</ion-col>
    </ion-row>
</ion-grid>

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

    Cordova CLI: 6.5.0
    Ionic Framework Version: 2.3.0-201703231941
    Ionic CLI Version: 3.0.0-beta.4
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Windows 10
    Node Version: v6.9.1
    Xcode version: Not installed

All 8 comments

I've released a new version 3.0.0-beta.1 with this fix, here are some steps to upgrade with the latest versions:

https://docs.google.com/document/d/1vGokwMXPQItZmTHZQbTO4qwj_SQymFhRS_nJmiH0K3w/edit?usp=sharing

Thanks! 馃檪

@brandyscarney Thanks for the fix
Can I ask why did you add "@angular/animations"? Where do you use it?

@AmitMY It is a peer dependency for Angular: https://github.com/angular/angular/blob/master/CHANGELOG.md#animation-package

@brandyscarney Oh, I was sure it was optional. Thanks for the link

@AmitMY I think maybe it should be, but Angular has it listed as a peer dependency on @angular/platform-server:

https://github.com/angular/angular/issues/15427#issuecomment-288824375
https://github.com/angular/angular/issues/15450#issuecomment-289027132

I actually just messaged the Angular team about it, so I'll let you know!

@AmitMY So it is a peer dependency on purpose, however since we are not using platform-server we decided to remove it from Ionic. I released a new version that doesn't need animations or platform-server: [email protected]

@brandyscarney Thanks for the very quick responses and updates.
So far (used for the last 4 days now), beta is stable except for that one bug https://github.com/driftyco/ionic/issues/10863 I know of

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daveshirman picture daveshirman  路  3Comments

Macstyg picture Macstyg  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments

MrBokeh picture MrBokeh  路  3Comments