jsakamoto / Toolbelt.Blazor.HeadElement

Head element support (change the document title, "meta" elements such as OGP, and "link" elements) for Blazor apps.
https://demo-blazor-headelement.azurewebsites.net/
Mozilla Public License 2.0
159 stars 11 forks source link

Is there any solution to changing the CSS class of the <body> element? #8

Open BenjaminCharlton opened 4 years ago

BenjaminCharlton commented 4 years ago

Hi jsakamoto!

Thank you for this excellent nuget package. I realize that your package is designed for manipulating the element but I would like the ability to manipulate the <body> element and I guess your code is very close already. Would you consider extending the functionality of this package to support attributes on the <body> tag? Or maybe you have another package available that can do that? Or can suggest an alternative please?

Many thanks for your advice.

Benjamin

jsakamoto commented 4 years ago

Thank you for your proposal! I'm not sure that the library for Blazor that manipulating CSS class names and attributes of the <body> already exists.

Anyway, It is very interesting for me, and it can be a very useful library.

But unfortunately, the implementation of the library that manipulating the <body> element isn't so similar to this library, unexpectedly.

Of course, to implement the library that manipulating the <body> element, the knowledge and experience that come from implementing this library are very helpful.

However, I have no plan that implements the library that manipulating the <body> element at this time. Because I don't need to manipulate <body> element in my any jobs or in any private projects at this time. Additionally, I have a lot of OSS libraries, and I have to maintain those libraries (especially, .NET 5 will come soon!), so I have to spend time on it.

To realize your proposal, I recommend that you (or somebody else who helps you) folk this project or copy some implementations from the source code of this library. This library is open-source (under the Mozilla Public License v2).

Happy Coding! 😄

BenjaminCharlton commented 4 years ago

Ok, jsakamoto, thank you for your fast response. I appreciate it. Benjamin