Skip to content

CSS Attribute not working -webkit-box-orient: vertical; #10723

Closed

Description

@carlosjtacon

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:

Line camp not working, ionic removes attribute from web inspector.

Expected behavior:

It worked before Ionic 2.1

Steps to reproduce:

I have a class with the attribute -webkit-box-orient: vertical; that is related to -webkit-line-clamp, but when I run the app, this attribute disappears so my text is rendering all the lines.

Related code:

.three_lines {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.three_lines_web_inspector {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
}

Other information:

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

Cordova CLI: 6.4.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.0 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v6.9.2
Xcode version: Xcode 8.2.1 Build version 8C1002

Activity

  1. jgw96 commented on Mar 13, 2017

    @jgw96
    Contributor

    Hello! Thanks for opening an issue with us! As this seems like more of a support question about an issue with your custom css i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!

  2. carlosjtacon commented on Mar 14, 2017

    @carlosjtacon
    Author

    It is not a problem with my css, it is that the transpile removes one of my properties, it worked before 2.1!!!

  3. albert-gonzalez commented on Mar 17, 2017

    @albert-gonzalez

    Hi!

    please, review this issue, it happens in my app too. I think it's because of the new optimizations of the version 1.1.x of ionic-app-scripts.

    I have just opened a issue in the app scripts project: ionic-team/ionic-app-scripts#821

    Thank you!

  4. rcd229 commented on Mar 24, 2017

    @rcd229

    Same here. I checked to make sure all of my CSS sections w/ line clamps also include the -webkit-box-orient property, and they do, but I can see in the Safari and Chrome web inspectors that that property disappears when I run on ionic serve or on an emulator/device. Can this issue be reopened??

  5. yuzhenApril commented on Apr 1, 2017

    @yuzhenApril

    i have the same issue.
    i also use ngStyle to write '-webkit-box-orient' into the element,but it just disappear when it was triggered(but the other CSS properties were included normally).

  6. vhinic commented on Apr 17, 2017

    @vhinic
    Contributor

    Same issue here. It simply removes "-webkit-box-orient: vertical;"

  7. swaraasolutions commented on Apr 28, 2017

    @swaraasolutions

    This issue can be resolved by adding following to the scss

    /* autoprefixer: off /
    -webkit-box-orient: vertical;
    /
    autoprefixer: on */

    This resolved the issue for me

  8. tietthinh commented on May 7, 2017

    @tietthinh

    @swaraasolutions Thank you, It's work for me, but notice that you missing something on your code, I recently change it to this and it work like a charm. Thanks anyway

    /* autoprefixer: off */
    
    -webkit-box-orient: vertical;
    
    /* autoprefixer: on */
    
  9. xu3u4 commented on Jun 13, 2017

    @xu3u4

    Many thanks to @swaraasolutions and @tietthinh.
    It works !!

  10. ionitron-bot commented on Sep 2, 2018

    @ionitron-bot

    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.

  11. locked and limited conversation to collaborators on Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions