Skip to content

fix(input): solve Input icon no longer shows Bulma hover/focus styles on left icon#169

Merged
mlmoravek merged 2 commits intooruga-ui:mainfrom
whiplashwebb:feature/right-icon-hover
May 7, 2025
Merged

fix(input): solve Input icon no longer shows Bulma hover/focus styles on left icon#169
mlmoravek merged 2 commits intooruga-ui:mainfrom
whiplashwebb:feature/right-icon-hover

Conversation

@whiplashwebb
Copy link
Copy Markdown
Contributor

Bulma supports adding hover and focus colors to input icons. Oruga has long supported this, but in the recent rewrites this functionality regressed. This PR fixes the problem.

Example of correct behaviour from Bulma docs

Screen.Recording.2025-04-03.at.12.36.37.PM.mov

Example of incorrect behaviour from Oruga docs

Screen.Recording.2025-04-03.at.12.49.00.PM.mov

What broke?

Bulma targets this style with a subsequent sibling selector sort of like this

.input:focus ~ .icon {
color:red;
}

When the input component was re-written the order of the input dom elements changed, going from input, left icon, right icon to left icon, input, right icon. This is totally logical since DOM order reflects visual order, but it breaks the Bulma selector for the left icon since it now comes before the focused input.

Related: oruga-ui/oruga#1271

Proposed Changes

  • Adds styles to restore left icon hover/focus states

@mlmoravek mlmoravek added the bug Something isn't working label May 5, 2025
@mlmoravek mlmoravek changed the title Bug : Input icon no longer shows Bulma hover/focus styles on left icon fix(input): solve Input icon no longer shows Bulma hover/focus styles on left icon May 5, 2025
@mlmoravek mlmoravek merged commit c40f214 into oruga-ui:main May 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants