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

Add scss support for style property #1121

Merged
merged 4 commits into from
Aug 25, 2024

Conversation

ovalkonia
Copy link
Contributor

Description

Instead of applying the raw data at once in the :style widget property, it now feeds it to the grass::from_string function before applying, just as it's done in the :css property. It makes the usage of SCSS features possible, and since SCSS is compatible with CSS, there's no breaking changes.

Closes #1040

Usage

N/A

Showcase

1718749591
Now this minimal configuration works just fine, which would not have gone so smoothly before due to the rgba(#FF0000, 0.4) format being a SCSS feature only!

Additional Notes

N/A

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

@ovalkonia ovalkonia changed the title Add scss for style property Add scss support for style property Jun 18, 2024
@elkowar
Copy link
Owner

elkowar commented Aug 25, 2024

While there are technically some things in GTK-CSS that are incompatible with scss, I think they are uncommon enough that it's reasonable to assume it won't come up. I'll merge this, although in the unlikely case that people do rely on some niche GTK-css specific syntax somewhere in these style attributes, we'll need to revert back.

@elkowar elkowar merged commit dc4def5 into elkowar:master Aug 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] rgba is limited from :style in yuck
3 participants