Skip to content

[Ionic v4] Button overflow hidden -> attribute contain as variable #14899

Closed

Description

@peterpeterparker

Ionic Info
@ionic/angular: "4.0.0-beta.0"

Describe the Bug
To follow up my previous issue about text overflow in button #14839 I noticed that it isn't yet possible to overflow a text in a button

The property contain of shadow button is fix set to content. If I want to overflow a text, I should be able to set this attribute to inherit otherwise the text won't be displayed

Expected Behavior
Add a css4 variable in order to override the attribute contain of buttons

Rendered code screenshot
43159544-edfaaa48-8f82-11e8-88ff-c0bbae931350

Activity

  1. brandyscarney commented on Aug 10, 2018

    @brandyscarney
    Member

    Thanks for the issue! Could you paste your button markup and styles so I can see what you're doing please? 🙂

  2. peterpeterparker commented on Aug 11, 2018

    @peterpeterparker
    ContributorAuthor

    @brandyscarney sure

    <ion-button class="big-button"
              no-margin no-padding>
    <div>
      <ion-icon name="icon"></ion-icon>
    
      <ion-label text-wrap no-margin>Text of the action</ion-label>
    </div>
    
    ion-button.button.big-button {
      border-radius: 50%;
      border: 0;
      background: $color-right;
      background: -webkit-linear-gradient($direction, $color-left, $color-right);
      background: -moz-linear-gradient($direction, $color-left, $color-right);
      background: -o-linear-gradient($direction, $color-left, $color-right);
      background: linear-gradient($direction, $color-left, $color-right);
      --background: transparent;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
     --box-shadow: none;
     --margin-top: 0;
     --overflow: visible;
     
      // HERE I need the Css4 contain variable
     --contain: inherit; 
    
      div {
        border-radius: 50%;
    
        ion-label {
          text-transform: none;
          white-space: normal;
          position: relative;
          margin: 0;
          overflow: inherit;
          font-weight: 300;
        }
     }
    }
    
    ion-button.button.big-button {
      width: 14rem;
      height: 14rem;
      --width: 14rem;
      --height: 14rem;
    
      div {
        width: 13.6rem;
        height: 13.6rem;
        --width: 13.6rem;
        --height: 13.6rem;
    
        ion-icon {
          padding-top: 2.7rem;
          font-size: 8rem;
        }
    
        ion-label {
          padding-top: 5.0rem;
        }
      }
    }
    

    I provided the PR, hope it's correct -> #15011

  3. peterpeterparker commented on Aug 17, 2018

    @peterpeterparker
    ContributorAuthor

    @brandyscarney don't want to rush you but would it be possible to merge my related PR #15011 for next beta?

    I've done some good progress in the (re)styling of my app and this attribute for my buttons becomes a missing chain

  4. peterpeterparker commented on Aug 19, 2018

    @peterpeterparker
    ContributorAuthor

    @brandyscarney you could forget this feature

    I have rewritten my code in order to use button instead of ion-button and added an animation à la fab-button which even produces a better look and feel and experience

    Therefore I close my feature request and my PR #15011

  5. ionitron-bot commented on Sep 18, 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.

  6. locked and limited conversation to collaborators on Sep 18, 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

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions