Skip to content

[Feature]: Support pseudo-classes and pseudo-elements #126

Description

@Nik0w

Problem

Hi again,

I would like to suggest adding support for pseudo-classes and pseudo-elements in Instatic CMS.

Problem

At the moment, it does not seem possible to define styles for element states such as hover, active, or focus. It also does not seem possible to style pseudo-elements like ::before and ::after.

This makes it difficult to create more advanced and polished web interfaces directly from the CMS.

Expected behavior

It would be very useful to have access to style states such as:

:hover
:active
:focus
:visited, when relevant

It would also be useful to support pseudo-elements such as:

::before
::after

For example, a button could have a different background color on hover, an underline animation using ::after, or decorative content added with ::before.

Why this matters

As a web developer with more than 10 years of experience, I consider pseudo-classes and pseudo-elements essential for modern web design.

They are widely used to create interactive states, micro-interactions, visual feedback, decorative elements, transitions, and accessibility-friendly focus styles.

Without them, many common design patterns require custom CSS outside the CMS, which reduces flexibility for both developers and content editors.

Proposed solution

Possible implementation

This could be added as a state selector in the style editor, allowing users to switch between the default style and states like hover, active, and focus.

For pseudo-elements, the editor could provide dedicated ::before and ::after sections where users can define properties such as content, position, size, background, border, transform, and transitions.

Thanks again for your work on Instatic CMS. I think this feature would make the styling system much more complete and powerful.

Alternatives considered

No response

Area

Visual editor

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or 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