CSS – Svelte: A unique style element without a unique global name

  • Home / Blog / CSS – Svelte:…

CSS – Svelte: A unique style element without a unique global name

Which CSS selector can I use below to target only external partitions?

<div>
    <div>...</div>
    <div>...</div>
</div>

<style>
    OUTER.DIV.ONLY {
        background: url(outer.png);
    }
</style>

Alternatively, I’d be happy to know if there’s a way to name an external div with someone. Scope locally A name that does not include anything in the compiled fleet.

I just can’t add class="outer" Because it is likely to conflict with existing style sheets.

I can add class="outer-au9a8bo9u" But it’s clumsy, especially since the useless bytes in this class will be included in the challenge compiler output.

I am posting in the hope that there is something more beautiful and effective.

Write a Comment

Your email address will not be published. Required fields are marked *

x