css-blocks
css-blocks copied to clipboard
external selectors
https://github.com/css-blocks/css-blocks#external-selectors
For posterity, since the readme is changing soon:
Sometime a class, identifier, or tag name comes from an external source, and the only thing you can do is use them as is. In these situations the Block must declare all external simple selectors it intends to use. These simple selectors may then be used as key selectors inside this Block. You'll get an error for any declared external selectors that aren't used or if they are used in the context selector.
Styles targeting an external selector are not rewritten and their declarations cannot be optimized! Style collisions on an external selector are not detected or resolved. As a result, it is allowed to use !important on declarations targeting an external selector.
Warning: If external selectors and CSS block objects both target the same HTML element in their key selectors you will get unpredictable results. It's best to avoid this.
@external h2 .some-rando-class;
.foo h2.some-rando-class {
font-size: 32px !important;
}
@chriseppstein is it still open? I could work on this.
@milandimun Yes, it is still open. Please let us know if/when you start working on it.
Ok i will start work on this in next week.
Dňa pi 19. 10. 2018 o 21:26 Chris Eppstein [email protected] napísala(a):
@milandimun https://github.com/milandimun Yes, it is still open. Please let us know if/when you start working on it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/linkedin/css-blocks/issues/10#issuecomment-431472876, or mute the thread https://github.com/notifications/unsubscribe-auth/AqP4SENLA-GITPajH-h7oQycbd6Agd1aks5umidqgaJpZM4NoO1_ .
Can you please explain me more details about what needs to be done to make it work - External Selectors - according to description I'dont know exactly what to do with that issue Thank you