-
Notifications
You must be signed in to change notification settings - Fork 1
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
Apply form-control variables to create consistent scaling #1950
Merged
Conversation
This file contains 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
- Adds missing root files to base and utility components. - Vrembem package now correctly builds all custom properties.
- This refactors the form-control core custom properties. - Ensures that all 6 form-control components are sized the same. - Removes unnecessary sizing variables from individual components.
This was referenced Jul 25, 2024
sebnitu
added a commit
that referenced
this pull request
Jul 30, 2024
…tyle language (#1961) This PR is a follow up to #1950 but expands the form-control inheritance to appearance variables. This includes a complete refactor of how form-controls are styled internally and removes a lot of redundancy. Form-controls have been setup to more easily be customized coherently using the newly provided `from-control` variables along with component specific custom property override options. Appearance variables are now applied using `hsl` relative values giving much more flexibility with selecting an accent color for form-controls. **Additional changes** - The `css` module now allows registering a component in the variables map without explicitly setting any custom properties by running the `css.register("[module-name]")` mixin. This is used to setup component level custom property overrides while only setting form-control custom property values as their defaults. - Added `loading-spinner` mixing to core and applied it to button component. - Added `form-control-properties` mixin and apply to button, input and menu components. - Added `button-base`, `input-base` and `menu-action-base` mixins to help make component styles more readable. - Created build directory for core component.
sebnitu
changed the title
Apply form-control variables to create a consistent scaling
Apply form-control variables to create consistent scaling
Jul 31, 2024
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.
What changed?
This PR aligns form-controls sizing and scale by applying from-control variables. This allows form-controls to adjust their size based on the
font-size
property. This also removes a lot of previously used variables for controlling form-control size such as padding and line-height.This is achieved by refactoring the
css.get
function to allow passing undefined properties as long as a fallback is also provided:In the above example,
--vb-button-font-size
is not defined, but--vb-form-control-font-size
is so it's value will be used while still allowing overriding the value whenever--vb-button-font-size
is defined. Applying this methodology to all form-controls also means the size of all form-controls can be set by defining--vb-form-control-font-size
.Lastly, this PR fixes root output issues with the
vrembem
package and includes missing root exports in bothbase
andutility
components. When usingvrembem
in a Sass environment, it's important to import all base components before running any rootcss.output()
calls. Here's an example of how a manifest might look: