-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: focus offset added for checkbox and buttons #390
Conversation
Related to: camunda-modeler #4632
b23f58e
to
bcc1399
Compare
@@ -537,8 +544,9 @@ select.bio-properties-panel-input { | |||
} | |||
|
|||
.bio-properties-panel-input[type="checkbox"]:focus { | |||
outline: 2px solid var(--input-focus-border-color); | |||
outline-offset: 0; | |||
outline: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why auto
? It let's the user agent render a custom outline style. Is this what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two directions to take here:
- It is integrators responsibility (Desktop Modeler, Web Modeler, bpmn.io demo, ...) to decide on outline (everything or subset, i.e. "you can decide on color")
- We offer reasonable defaults, and folks may override, i.e. to better embed in a 90s style website.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I'd expect it to be consistent. If we already set the color we should also set the style. As you said, one can always override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. We should maintain consistent styling across all child libraries instead of relying entirely on integrators. While we can allow them the flexibility to override styles, our defaults should not depend on their configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've already specified the color in the same class. Using the auto property ensures an default outline is provided, overriding the none outline for inputs.
.bio-properties-panel-input:focus,
.bio-properties-panel-input:focus-within {
outline: none;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, looking to @philippfromme for final check.
Yes, because outline color is setup by the application. |
@abdul99ahad ready to be released and integrated ✔️ |
Related to camunda/camunda-modeler#4632
Proposed Changes
Fixed the focus outline offset
Checkbox:
Button:
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}