Skip to content

Conversation

@HappySunChild
Copy link
Owner

Implements #27

I'm not too sure about the name of the StyleProperties SpecialKey, seems a little verbose but it's fine for now.

- 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.
@HappySunChild HappySunChild added enhancement New feature or request not ready - evaluating Currently gauging feedback labels Sep 21, 2025
@HappySunChild HappySunChild linked an issue Sep 21, 2025 that may be closed by this pull request
@HappySunChild
Copy link
Owner Author

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.

@HappySunChild
Copy link
Owner Author

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.

@HappySunChild
Copy link
Owner Author

I have a feeling that recent commits are going to make this a pain to merge. Oh well

@HappySunChild HappySunChild added not ready - design wanted Good idea but needs design work and removed not ready - evaluating Currently gauging feedback labels Oct 19, 2025
@HappySunChild HappySunChild added the targeting: roblox About Roblox packages label Oct 20, 2025
@HappySunChild HappySunChild marked this pull request as draft October 26, 2025 17:27
@HappySunChild HappySunChild added ready to work on Enhancements/changes ready to be made and removed not ready - design wanted Good idea but needs design work labels Dec 30, 2025
@HappySunChild
Copy link
Owner Author

HappySunChild commented Dec 30, 2025

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 default_properties.luau file as a whole just so you don't have to spam[Default] = { "BackgroundColor3" } everywhere you want a stylesheet to be applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready to work on Enhancements/changes ready to be made targeting: roblox About Roblox packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Stylesheets Support

2 participants