You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
AS A Software Engineer I WOULD LIKE TO have rulesets belonging to the same selectors merged across multiple GSS files SO THAT I may have a more efficient and smaller CSS file as a result.
Description
At the time of writing, rulesets belonging to the same selector are only merged, if they are consecutive to one another / adjacent to one another.
I would like to have this behaviour expanded in a way, that rulesets belonging to the same selector are also merged if they are at different parts of the same GSS file, or are in the different parts of multiple GSS files.
Current Behaviour
Same File ; Consecutive rulesets ; Rulesets are merged
GIVEN I have the following CSS rulesets in the same GSS file :
/* ... */
body {
background-color : #f00;
}
body {
padding : 13px;
}
/* ... */
WHEN I perform a compilation gss my.gss THEN I receive the following output:
I would be more than happy to perform a contribution to the project by implementing this behaviour. As far as I could tell by an initial mediocre inspection, this feature could relatively easily be delivered by an outsider based on the implementation of MergeAdjacentRulesetNodesWithSameDeclarations .
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary
AS A Software Engineer
I WOULD LIKE TO have rulesets belonging to the same selectors merged across multiple GSS files
SO THAT I may have a more efficient and smaller CSS file as a result.
Description
At the time of writing, rulesets belonging to the same selector are only merged, if they are consecutive to one another / adjacent to one another.
I would like to have this behaviour expanded in a way, that rulesets belonging to the same selector are also merged if they are at different parts of the same GSS file, or are in the different parts of multiple GSS files.
Current Behaviour
Same File ; Consecutive rulesets ; Rulesets are merged
GIVEN I have the following CSS rulesets in the same GSS file :
WHEN I perform a compilation
gss my.gss
THEN I receive the following output:
Separate, but consecutive / adjacent files ; Consecutive rulesets ; Rulesets are merged
GIVEN I have the following CSS ruleset in
first.gss
AND the following css ruleset in
second.gss
WHEN I perform a compilation
gss first.gss second.gss
THEN I receive the following output:
Same File ; Ruleset in between ; Rulesets are NOT merged
GIVEN I have the following CSS rulesets in the same GSS file :
WHEN I perform a compilation
gss my.gss
THEN I receive the following output:
Separate, but consecutive / adjacent files ; Ruleset in between ; Rulesets are NOT merged
GIVEN I have the following CSS ruleset in
first.gss
AND the following css ruleset in
second.gss
WHEN I perform a compilation
gss first.gss second.gss
THEN I receive the following output:
Expected Behaviour
Same File ; Ruleset in between ; Rulesets ARE merged
GIVEN I have the following CSS rulesets in the same GSS file :
WHEN I perform a compilation
gss my.gss
THEN I receive the following output:
Separate, but consecutive / adjacent files ; Ruleset in between ; Rulesets ARE merged
GIVEN I have the following CSS ruleset in
first.gss
AND the following css ruleset in
second.gss
WHEN I perform a compilation
gss first.gss second.gss
THEN I receive the following output:
Additional Comments
I would be more than happy to perform a contribution to the project by implementing this behaviour. As far as I could tell by an initial mediocre inspection, this feature could relatively easily be delivered by an outsider based on the implementation of
MergeAdjacentRulesetNodesWithSameDeclarations
.The text was updated successfully, but these errors were encountered: