Repository navigation
Add label visibility and icon color options - #1
Merged
Merged
Conversation
Replaces the hide-label-on-mobile toggle with a three-way label visibility control: visible, hidden below the mobile breakpoint, or always hidden. The always-hidden state is a plain compiled CSS rule since it carries no breakpoint to filter. hmHideLabelOnMobile is kept and still read on the front end for backwards compatibility: a button saved before this change carries only that flag, and true with no hmLabelVisibility in the comment still resolves to the mobile state.
An uploaded SVG keeps whatever colour it was drawn with, so this is scoped to a registered icon: it defaults to the button's own text colour, unchanged, and a chosen colour overrides that via an inline style on the icon's <svg> root.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the hide-label-on-mobile toggle with a three-way label control: visible (default), hidden below the mobile breakpoint, or always hidden. The always-hidden state is a plain compiled CSS rule, since unlike the mobile state it carries no breakpoint to filter.
hmHideLabelOnMobile stays registered and is still read on the front end for backwards compatibility. A button saved before this change carries only that flag, and true with no hmLabelVisibility in the comment still resolves to the mobile state, so nothing already published changes appearance.
Also adds a Color control, scoped to a registered icon (an uploaded SVG keeps whatever colour it was drawn with). Defaults to the button's own text colour, unchanged; a chosen colour overrides that via an inline style on the icon's svg root.
Version bump and tag come after this merges.