Skip to content
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 dialog custom property overrides to modal and drawer components #2018

Merged
merged 16 commits into from
Sep 13, 2024

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Sep 13, 2024

What changed?

This PR primarily refactors how the dialog component's custom properties are used within the context of the modal and drawer components. This removes the need to apply component specific dialog styles and properties for modal and drawer and instead only pass a property map to the CSS override mixin for when default dialog styles need to be changed.

To achieve this, new $dialog-override maps have been added to modal and drawer components along with $inline-dialog-override and $modal-dialog-override for drawer to override dialog styles based on the drawer's mode. These maps are then passed to css.override("dialog", $map...) to help give more control over dialog styles without having to create redundant dialog properties.

Additional Changes

  • Modal and drawer SCSS and custom property variables have been greatly simplified.
  • Create core screen variables that are shared between modal and modal drawer styles.
  • Create focus-ring property function calls for color and opacity. This returns a custom property with the module, core and css value fallback stack.
  • Applied focus-ring styles to the dialog component.
  • Update modal and drawer documentation examples.
  • Vrembem vite demo markup now includes dialog, modal and drawer examples.

- This is used to more easily return a focus-ring property with the module, core and value fallback stack.
@sebnitu sebnitu marked this pull request as ready for review September 13, 2024 16:10
@sebnitu sebnitu merged commit 6363c23 into next Sep 13, 2024
2 checks passed
@sebnitu sebnitu deleted the next-dialog branch September 13, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant