Svelte · Junior · Question 5 of 76

How is CSS in a component's <style> block applied by default?

Explanation

For global rules use :global(...) or a :global { ... } block. Unused selectors produce a compiler warning and are removed from the output.

Further reading

Problem with a question

Svelte · Junior · question 5

Test yourself

Take the Svelte · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz