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

Using CSS variables? #205

Open
venelinn opened this issue Feb 20, 2023 · 2 comments
Open

Using CSS variables? #205

venelinn opened this issue Feb 20, 2023 · 2 comments
Labels
Feature New feature that will be added to the project Needs: Design The issues needs design work before implementing

Comments

@venelinn
Copy link

Hello and thank you for that great plugin !
I'm wondering what will be the effort using CSS variables.
It will be so easy to overwrite some default values.
For example:
border-color: var(--blazored-border-color, var(--color-info))

Thank you!

BTW, I'm willing to help 😄

@venelinn venelinn added Question Question about this project Triage Issue needs to be triaged labels Feb 20, 2023
@chrissainty
Copy link
Member

I think this would be a great addition. It's something I'd wanted to do a while ago and I kind of forgot about it.

I'd be happy to take a PR for this. Perhaps we should agree what custom properties we want to define and then you can start the PR.

@chrissainty chrissainty added Feature New feature that will be added to the project Needs: Design The issues needs design work before implementing and removed Question Question about this project Triage Issue needs to be triaged labels Feb 21, 2023
@taylorchasewhite
Copy link
Contributor

@venelinn @chrissainty I'd be willing to do this, I haven't looked too much into the CSS but if agree--if either of you have specific custom properties I can be sure to add them.

Otherwise, I will read through and pick out ones that make sense.

Other design considerations:

  1. In @venelinn's example, it looks like you're making the variable apply to all of Blazored (--blazored-border-color). I think this probably should be Blazored Toast specific, not generic to all of the Blazored repos. But open to other ideas.
  2. Need to define the prefix, I think --bt-{property-name} is decent, but could also make it more verbose (--blazored-toasts-{property-name}) if desired.
  3. I'm not exactly sure how "overwriting" the variables will work, e.g. if we define the value in the bundled CSS files from the RCL, will those definitions win out over the values defined by the consumer? Or were you both thinking these would be parameters to the BlazoredToasts component and applied to the css variables (this would work too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature that will be added to the project Needs: Design The issues needs design work before implementing
Projects
None yet
Development

No branches or pull requests

3 participants