css-blocks icon indicating copy to clipboard operation
css-blocks copied to clipboard

external selectors

Open chriseppstein opened this issue 8 years ago • 5 comments

https://github.com/css-blocks/css-blocks#external-selectors

chriseppstein avatar May 27 '17 04:05 chriseppstein

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;
}

amiller-gh avatar Apr 18 '18 16:04 amiller-gh

@chriseppstein is it still open? I could work on this.

milandimun avatar Oct 19 '18 17:10 milandimun

@milandimun Yes, it is still open. Please let us know if/when you start working on it.

chriseppstein avatar Oct 19 '18 19:10 chriseppstein

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_ .

milandimun avatar Oct 19 '18 23:10 milandimun

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

milandimun avatar Nov 16 '18 20:11 milandimun