Skip to content

[4.0.0-rc.0] Menu button is offset #16950

Closed

Description

@mhartington

Bug Report

Ionic version:

[x] 4.x

Current behavior:

In a toolbar with a menu-button, the menu-button's padding will be offset differently if there is a ion-title vs ion-segment

Expected behavior:

The padding should be consistent.

Steps to reproduce:

Related code:

Here the button's padding is wrong

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-segment>
      <ion-segment-button value="all">
        All
      </ion-segment-button>
      <ion-segment-button value="favorites">
        Favorites
      </ion-segment-button>
    </ion-segment>
  </ion-toolbar>
</ion-header>

Here is is correct

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title>Speakers</ion-title>
  </ion-toolbar>
</ion-header>

Ionic conference app

screen shot 2019-01-03 at 2 40 54 pm
screen shot 2019-01-03 at 2 40 48 pm

Activity

  1. added
    package: core
    type: bug
    on Jan 3, 2019
  2. brandyscarney commented on Feb 14, 2019

    @brandyscarney
    Member

    Okay finally got to debug this. The source of this bug is the following CSS: https://github.com/ionic-team/ionic/blob/master/core/src/components/toolbar/toolbar.md.scss#L33-L38

    :host(.toolbar-segment) {
      --padding-top: 0;
      --padding-bottom: 0;
      --padding-start: 0;
      --padding-end: 0;
    }

    This was added in Toolbar so that when a segment is the only component in the toolbar it won't have any padding around it, but I agree that it looks weird with buttons in the toolbar with it. I don't want to remove this in it's entirety since it's needed for that use case so I will look into a better solution.

  3. added a commit that references this issue on May 22, 2019
    3da7254
  4. ionitron-bot commented on Jun 16, 2019

    @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.

  5. locked and limited conversation to collaborators on Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

package: coretype: bug

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