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

merge different selectors with similar properties #27

Open
yairEO opened this issue Apr 27, 2015 · 0 comments
Open

merge different selectors with similar properties #27

yairEO opened this issue Apr 27, 2015 · 0 comments

Comments

@yairEO
Copy link

yairEO commented Apr 27, 2015

Turn this:

a{ color:red; opacity:1; background:blue; }
b{ color:red; opacity:1; background:blue; height:10px; }

To this:

a,b{ color:red; opacity:1; background:blue; }
b{ height:10px; }

But only if it's "worth it" meaning, bytes were saved. in some situations the selector might be too long and not worth it:

a{ color:red; opacity:1; background:blue; }
.this_is_a_very > .long_selector ~ ul.drop_down_selector > li.list_item b{ color:red; opacity:1; background:blue; }

in the above example it's not worth repeating that long selector again, just to merge it's properties with a selector. it would result in a larger output.

This would eliminate the need to use extend methods in pre-processors manually and ease the workflow.

@yairEO yairEO changed the title merge together different selectors with similar properties merge different selectors with similar properties Apr 27, 2015
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

No branches or pull requests

1 participant