Skip to content

Conversation

@breadtk
Copy link

@breadtk breadtk commented Aug 30, 2025

Description

Within the Options page, the #save button is displayed as "No changes"
(10 chars) on load. When onUpdated() is called in pages/options.js,
it turns into "Save changes" (12 chars). This commit ensures that the
update label is appropriately centered, even if that means less padding
on left/right, as opposed to having more padding on left/right in the
fixed size button.

Within the Options page, the `#save` button is displayed as "No changes"
(10 chars) on load. When `onUpdated()` is called in `pages/options.js`,
it turns into "Save changes" (12 chars). This commit ensures that the
update label is appropriately centered, even if that means less padding
on left/right, as opposed to having more padding on left/right in the
fixed size button.
@UncleSnail
Copy link
Contributor

I think the preferred way to do this might be to remove the width property from the #save styles. That would mean that the button size can change though, so it depends on preference. However, this problem is likely to happen again in the future since the Add Rule button, and potentially other buttons, also share the #save style. It might be better just let them set their own width to avoid accidentally letting the text overflow. We could also use a min-width instead, and then future accidentally longer text wouldn't overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants