-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Granular and directional control of merging selectors #1468
Comments
@scottgit, it worth considering if successive identical selectors can be merged by default since it will not affect the computed style. I don't want to fragment this feature request but IMO there is another feature that related to the same problem domain that might be a place to consider, which is implementing "channels/groups/sections/regions" that will allow coders to "group" subset of styles from different places to be outputted as css in a specified location. Consider this syntax:
The
The same idea will work also for |
@danielkatz I very much like the grouping idea added to the discussion. I have to disagree somewhat, however, with your opening statement "if successive identical selectors can be merged by default since it will not affect the computed style." I do think there should be the option to merge by default (that is what #930 is about), but the whole point of my adding this feature request was because merging identical selectors can affect computed style, because of the css cascade. That was what I illustrated in this comment. So having the option to merge or not merge on an individual selector basis allows one to control the cascade sequence. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is a feature request related to:
The request is to allow control of where a globally merge occurs and also the option of overriding the globally set value to merge or not merge selectors on an individual selector basis. For explanation of reason, see this comment and some of the following comment discussions. This is to give control to the coder for purposes of utilizing the cascade in css if so desired:
Perhaps syntax for granular control might be something like:
To Opt Out
.someSelector:merge(none) { prop: somevalue; }
To Direct Merge Location
.someSelector:merge(first) { prop: somevalue; } //or maybe keyword "up"
.someSelector:merge(last) { prop: somevalue; } //or maybe keyword "down"
The text was updated successfully, but these errors were encountered: