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

[Feature request] No longer use a bootstrap overlay to make it easier to modify colors #6420

Open
bastien70 opened this issue Aug 19, 2024 · 0 comments

Comments

@bastien70
Copy link
Contributor

Short description of what this feature will allow to do:

Currently, EasyAdmin uses an overlay to Bootstrap. As a result, there are a lot of variables that are created.

If you simply want to modify the basic colors (primary, secondary, success, warning, info, danger, light, dark), it's a real ordeal, because there are variables for absolutely everything: buttons, badges, alerts , etc...

Concerning the alerts, I even had the unpleasant surprise to notice that the variables used referred to completely arbitrary colors :

.alert.alert-primary {
    --bs-alert-bg: var(--alert-primary-bg);
    --bs-alert-border-color: var(--alert-primary-border-color);
    --bs-alert-color: var(--alert-primary-color);

And these colors do not depend on the primary color (or secondary, danger, ..., if we want alerts for these)

image

This is a real hindrance to customization because it forces us to track and change absolutely everything.

Example of how to use this feature

The idea would then be to either get rid of the overlay on Bootstrap, or to limit it, or to optimize the color system so that in all elements, they depend directly on the variables containing the colors primary, secondary, success, danger, warning, info, ...

For example, we would have a --color-primary variable with the primary color.

From this, all the other necessary variables would be managed automatically:

--color-primary-200, --color-primary-600, etc...

And this would be used in the style of the necessary elements.

So by only changing the value of the --color-primary variable, the change would be taken into account everywhere without having to touch anything else

Possible reluctance

I suspect that such a change is not trivial. The answer will probably be no, but we should nevertheless think of something to improve the ease of customizing colors at a minimum.

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

No branches or pull requests

1 participant