Skip to content

Cannot override mode styles on many components #17608

Closed

Description

@imhoffd

The docs for overriding mode styles aren't accurate for several components, e.g.

.ios ion-item {
  ...
}

Activity

  1. brandyscarney commented on Feb 25, 2019

    @brandyscarney
    Member

    I believe certain components need be updated to include the following:

    ...createThemedClasses(this.mode, 'item'),
    

    I'm not sure why this was removed as it looks intentional, but will look into this.

  2. added
    package: core
    type: bug
    on Feb 25, 2019
  3. added a commit that references this issue on Apr 10, 2019
  4. brandyscarney commented on Apr 16, 2019

    @brandyscarney
    Member

    This has been added for the 4.3.0 release. The full list of components that have the mode class now can be seen in the table at the bottom of this PR: #17838

    It can be used like the following:

    ion-item.md {
      // MD styles
    }
    
    ion-item.ios {
      // iOS styles
    }

    Note that this is only a problem for components that are being used inside of a shadow element. If using light DOM you can still use the documented way to style by mode.

  5. ionitron-bot commented on May 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.

  6. locked and limited conversation to collaborators on May 16, 2019
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

    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