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

text-center css utility doesn't center text #10567

Closed
prashantkurlekar opened this issue Feb 27, 2017 · 16 comments
Closed

text-center css utility doesn't center text #10567

prashantkurlekar opened this issue Feb 27, 2017 · 16 comments
Assignees

Comments

@prashantkurlekar
Copy link

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.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:
text-center css utility doesn't center the text.

Expected behavior:
text-center css utility center align the text.

Steps to reproduce:
use ionic version 2.1.0

Related code:

<ion-item text-center><a (click)="myEvent()">Some text</a></ion-item>

Other information:
this issue is not there with 2.0.1

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

Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.0 
ios-sim version: 5.0.11 
OS: macOS Sierra
Node Version: v7.5.0
Xcode version: Xcode 8.2.1 Build version 8C1002
![localhost-8120- iphone 6 1](https://cloud.githubusercontent.com/assets/4653712/23346791/7229121c-fcf1-11e6-9b6a-60c5d273cf10.png)
![localhost-8120- iphone 6](https://cloud.githubusercontent.com/assets/4653712/23346792/722a21ca-fcf1-11e6-9f78-ff3a26f9d173.png)
@brandyscarney
Copy link
Member

Thanks for the issue! This was caused by moving the css from typography to app: f47d492

@urm47
Copy link

urm47 commented Mar 14, 2017

same question, text-center doesn't seem to work anymore:

<ion-item class="small-info" text-center text-wrap *ngIf="username != ''">Logged in as {{username}}</ion-item>

bildschirmfoto 2017-03-14 um 20 54 41

edit:
.item-block overwrites text-align
bildschirmfoto 2017-03-15 um 13 36 00

Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.4
Xcode version: Xcode 8.2.1 Build version 8C1002

@Arnaud49
Copy link

Arnaud49 commented Apr 7, 2017

hello here, I confirme I have this issue running in my project since I update ionic, can you correct this ? or give us some temporary correction ?

brandyscarney added a commit that referenced this issue Apr 14, 2017
- moves breakpoint mixins to the ionic.mixins file
- adds responsive attributes for text alignment, transform, and
floating elements
- adds ability to turn these off so they don’t get added to the css
file using sass variables

references #10904
closes #10567
@floydspace
Copy link
Contributor

@Arnaud49 What I did, just put @import "../../node_modules/ionic-angular/components/app/app";
to the beginning of my app.scss and it overrided the styles back.
But be careful it also overrides App Structure styles - see

@brandyscarney
Copy link
Member

This should no longer be an issue since v3.1.0. Please let me know if you are still running into this on 3.1.0+. Thanks!

@floydspace
Copy link
Contributor

@brandyscarney Sure, but migration to the v3.1.0 from v2.0.0 is more painful than to v2.3.0 for example. So I had to do such workaround.

@brandyscarney
Copy link
Member

@F1oyd Are there some issues in particular that are making it hard to upgrade? The steps to go from v2 to v3 should be fairly simple, but maybe you are running into some blocking issues or steps that aren't documented?

https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#300-2017-04-05

@floydspace
Copy link
Contributor

@brandyscarney We use a couple of third-party libs which don't work with angular 4. If it is possible it will be more expensive.

@mhartington
Copy link
Contributor

Hey @F1oyd , what libraries are you using that don't work with Angular 4?

@floydspace
Copy link
Contributor

Okay. you made me do it. So I couldn't find any unsupported third-party lib in my app, but hypothetically it could be.
I wanted to say that migration to the major version is more expensive and in some cases, it's not possible without a lot of hours of QA. So it would be good to have a previous major release without bugs if it's possible.
Thank you.

@mhartington
Copy link
Contributor

but hypothetically it could be.

Hypothetically, yes. But this is something to note when there is a major version change (2.x => 4.x for angular). Any libraries that you have that are based on Angular should have their supported version listed in their dependencies. That and they should release an update that is also a major version change.

I wanted to say that migration to the major version is more expensive and in some cases, it's not possible without a lot of hours of QA

We do list all of our breaking changes in the change log and note when things have been changed or removed from the framework. So we try to make sure everyone is on the same page.

So it would be good to have a previous major release without bugs if it's possible.

We're not perfect, we've accepted this. But when there are unforeseen issues, we do make sure to get a patch release out to fix our mistakes 😄

@shivamsngh
Copy link

HI @brandyscarney , Im using latest ionic 3.7.0 and in Debug mode everything is working perfectly fine but in Prod mode , I think the inbuilt Ionic CSS doesn't load also text-center doesn't work. There is no padding and margin on ion-items

@brandyscarney
Copy link
Member

Hello @shivamsngh, so it sounds like 3.7.0 is your Ionic CLI version. If you run ionic info from within your project it should print something similar to this:

cli packages:

    @ionic/cli-plugin-cordova       : 1.6.2
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils                : 1.7.0
    ionic (Ionic CLI)               : 3.7.0

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : ios 4.4.0
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.1.7
    Node              : v7.5.0
    OS                : OS X El Capitan
    Xcode             : Xcode 8.2.1 Build version 8C1002
    npm               : 4.6.1

Can you verify that your Ionic Framework ionic-angular version and @ionic/app-scripts matches mine? Steps to upgrade between versions are here: https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md

@shivamsngh
Copy link

shivamsngh commented Aug 7, 2017

Ionic Info:

@ionic/cli-plugin-cordova       : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.0.0
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.5.3

System:

Android SDK Tools : 25.2.5
Node              : v7.5.0
OS                : macOS Sierra
npm               : 4.1.2

I just downgraded my apps-scripts to 2.0.0 from 2.1.3 due to missing css styles. I think the best possible scenario of my situation is in apps-scripts issue 1120 ionic-team/ionic-app-scripts#1120 .

@shivamsngh
Copy link

shivamsngh commented Aug 7, 2017

@brandyscarney ohh i think i got the problem , it was my ionic-angular version that was 3.5.3 instead of 3.6.0, thank so much for help brandy.. 👍

Working for me now at,

cli packages:

ionic/cli-plugin-cordova       : 1.6.2
ionic/cli-plugin-ionic-angular : 1.4.1
ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.6.0

System:

Android SDK Tools : 25.2.5
Node              : v7.5.0
OS                : macOS Sierra
npm               : 4.1.2

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants