samatechtw / pubstudio-builder

Editor, renderer, and backend API for the PubStudio site builder.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Pseudo styles not shown as inherited #205

Closed sampullman closed 10 months ago

sampullman commented 10 months ago

When switching to another pseudo class, styles inherited from the default pseudo class should show inheritance info instead of a remove button.

Site example: 230107_pseudo-bug.json

https://github.com/samatechtw/pubstudio-builder/assets/59676941/d9e61eec-d192-4a4d-abf8-aa3972c07438

sampullman commented 10 months ago

@abemscac I have an idea about how to solve this, but I'm not sure if it's over-complicated.

It seems like computeComponentFlattenedStyles needs to include the pseudo style when used in the component/style menu, in order to calculate inheritedFrom. But I don't think that information is necessary when called from getPageStyle or findStyles, so maybe there's a more efficient way (split up the function so only the required data is returned)?

abemscac commented 10 months ago

Got it, splitting them up makes sense to me. I'll take a look at this today, thank you!

github-actions[bot] commented 9 months ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: