Skip to content

feat: Complete CSS flex utilities by display and flex properties. #22469

Closed

Description

@infacto

Feature Request

Ionic version:
[x] 5.x (5.4.3)

Describe the Feature Request
It's a great idea to provide these css utilities. Every great UI framework should have it. But some essential css utilities are missing.
For example a class for display: flex and flex: 1 etc. Nothing special, only the very common flex attributes.

Describe Preferred Solution
A good example is Vuetify (and here). I thinking about classes like:

.ion-flex-container {
  display: flex;
}

.ion-flex-column {
  flex-direction: column;
}

.ion-flex {
  flex: 1;
}

/* And utilities for display attr. like: (or .ion-d-block) */
.ion-display-block {
  display: block;
}

.ion-display-flex {
  display: flex;
}

Describe Alternatives
I could create my own global classes. But it would be more consistent when these is provided by the UI framework itself. And it's about avoiding global styles.

Related Code
See the Ionic source code and docs.

Additional Context
I understand that the current flex classnames are only for modification of alignment in a flex container (e.g. from an Ionic element.) But it would be great if Ionic provides such CSS utilities (like Vuetify) to allow e.g. flex layouts with no need of custom CSS. It's not a question what the developer can or should create. In this case, I could create the whole UI framework like Ionic. It's more a philosophical question about what can a UI framework provide for UI stuff to make the life of developers easier. A build-in solution with no need to add more dependencies or custom css. Providing the power to make something awesome. See it as an idea and decide whether to close it or do it. ... I don't want to compare UI frameworks. So sorry that I notice Vuetify again. But I like the way to break imaginary blockages of the strict material design. In my opinion we should not follow incomprehensible restrictions when it's restricts our creativity and freedom. But maybe another topic. Back to this css request... :)

Activity

  1. added
    package: core
    type: feature request
    on Nov 10, 2020
  2. yathindrak commented on Aug 31, 2022

    @yathindrak

    +1 for adding a class for display: flex as this is an essential use case.

  3. added
    type: feature request
    and removed
    type: feature request
    on Jun 6, 2025
  4. added 4 commits that reference this issue on Jul 28, 2025
    498583f
    a3ccaa0
    265d781
    75f6c05
  5. ionitron-bot commented on Aug 29, 2025

    @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 Aug 29, 2025
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: feature request

    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