-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Adds CSS support for shadows and a simpler way of defining shadows in XAML #27180
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
Conversation
@@ -0,0 +1,141 @@ | |||
#nullable disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be
#nullable disable | |
#nullable enable |
?
Added support for the various solid color implementations;
EDIT: I still want to improve this a bit to also allow X11 named colors and HSV/HSVA.
|
Updated color parsing for more color support.
|
While I'd love to get individual property support through CSS in there, it might be a bit of a big change to pull off in the short term. Therefore I'm setting this as ready for review to get the basic support rolling. We can then improve upon it in the future after giving the best solution some more thought. |
/azp run |
This comment was marked as outdated.
This comment was marked as outdated.
3 similar comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
8e69851
to
79c5933
Compare
Azure Pipelines successfully started running 3 pipeline(s). |
Should this be targeting .NET 10 since it is a new thing? If we are to target .NET 9/main, then the converter will have to be internal. We can always merge the converter as internal, and then open an issue to make it public in net 10 once main is merged up to net10. |
If making it |
Azure Pipelines successfully started running 3 pipeline(s). |
/// <summary> | ||
/// Type converter for converting a properly formatted string to a Shadow. | ||
/// </summary> | ||
internal class ShadowTypeConverter : TypeConverter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make ShadowTypeConverter
public and enabled nullable references #nullable enable
Description of Change
Added support for a new
-maui-shadow
CSS property which can be used to initialize aShadow
on aVisualElement
. This also introduces a newShadowTypeConverter
that allows for 3 different ways to initialize a Shadow. These have been kept in line as much as possible with the existing guidelines on box-shadows in CSS.Or in XAML:
Issues Fixed
This currently contains a basic implementation for #27157.