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

Enable microfrontends to apply styles based on their embedding context #497

Closed
danielwiehl opened this issue Oct 3, 2023 · 1 comment
Closed

Comments

@danielwiehl
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The SCION Workbench integrates microfrontends in different places, such as views and overlays. The microfrontends have a different background color depending on where they are embedded. For example, in dark mode, the background color of overlays is slightly brighter, or views in the peripheral area have a different background color than views in the main area.

Describe the solution you'd like

The workbench should provide information about the embedding context to enable microfrontends to apply styles based on their embedding context.

For example, the workbench could set the following CSS classes on the HTML root element of embedded microfrontends:

  • Workbench View: workbench-view or workbench-peripheral-view
  • Workbench Dialog: workbench-dialog
  • Workbench Popup: workbench-popup

Additional context

See SchweizerischeBundesbahnen/scion-microfrontend-platform#250 enabling an application to associate CSS class(es) with a router outlet.

@k-genov
Copy link
Contributor

k-genov commented Aug 22, 2024

Background should not be set (transparent) and microfrontend should have same colour scheme as the workbench host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants