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

Reduce CSS by removing :not() selectors if variation is disabled #3118

Merged
merged 44 commits into from
Dec 20, 2024

Conversation

lubber-de
Copy link
Member

Description

A lot of :not() css selectors are not needed when the related variation has been disabled and thus isn't compiled
This PR makes sure such selectors are removed upon compilation which reduces the generated css even more

For example if one disables circular step in variation.variables (or in a custom site.variables)

@variationStepCircular: false;

then all the :not(.circular) selectors can be removed as a .ui.circular.step won't exist after compilation, so there is no need to differentiate between them anymore

As everything is enabled by default, this change does not affect anything and is completely backward compatible

@lubber-de lubber-de added lang/css Anything involving CSS type/build Anything related to the build process state/awaiting-reviews Pull requests which are waiting for reviews labels Nov 10, 2024
@lubber-de lubber-de added this to the 2.9.4 milestone Nov 10, 2024
@lubber-de lubber-de merged commit 84fc179 into fomantic:develop Dec 20, 2024
11 checks passed
@lubber-de lubber-de deleted the removeNotSelectorsOnPurpose branch December 20, 2024 19:51
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS type/build Anything related to the build process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant