-
Notifications
You must be signed in to change notification settings - Fork 0
Stylesheets #30
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
base: main
Are you sure you want to change the base?
Stylesheets #30
Conversation
- Default, resets the specified properties of the applied Instance - Derives, sets the derives of the applied StyleSheet - RuleProperties, sets the properties of the applied StyleRule using `StyleRule:SetProperty` (supports state objects) - Rules, adds StyleRules to the applied Instance - Style, creates a StyleLink in the applied Instance
utility for creating StyleRules and StyleSheets, uses the style related SpecialKeys internally.
|
I've been thinking about ditching the StyleProperties SpecialKey, or atleast removing state object support for it. You can just use Attributes and tokens for most applications, it doesn't really make sense to keep both since it's kind of confusing. A lot of things need to be reworked as it's kind of awkward to work with right now. My main goal with the SpecialKeys was the ability to hook into preexisting stylesheets, but it really just causes more confusion (no pun intended). Since you're able to either use New with these SpecialKeys, or use the custom constructors, it kind of seems redundant to keep both. |
|
I think the problem with supplying specific SpecialKeys that only work for certain features is that most people will probably never use them, and they end up just being redundant. I think the solution here may be to allow users to easily create their own SpecialKeys, so that they can implement the features they need if they want without having to create a wrapper or memorize the way SpecialKeys are structured. I've already sort of have this in ConFusion with the SpecialKey constructor in roblox-instances/keys, but I just haven't exposed it from inside the main export table. I don't really think it should be exported either, since it's also a very niche feature. Most people won't be creating custom SpecialKeys that often to warrant it being exported, so maybe you can directly require it with something like 'require("ConFusion/roblox-instances/keys/SpecialKey")' This is all just speculation so none of this is actually guaranteed to happen, though I do generally lean more towards the direct require method. |
|
I have a feeling that recent commits are going to make this a pain to merge. Oh well |
|
Just realized that the default properties that are provided by ConFusion/Fusion are going to make working with stylesheets extra annoying. I'm considering removing the |
Implements #27
I'm not too sure about the name of the
StylePropertiesSpecialKey, seems a little verbose but it's fine for now.