Skip to content

Conversation

@LKL2017
Copy link

@LKL2017 LKL2017 commented Mar 12, 2024

No description provided.

:host-context(.error) {
font-size: 30px;
color: red;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the goal is to use css variables to see the power of this feature and learn how to use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of my personal programming intuition, I regard this scss file as the entry point to control the static-text component style. And do you mean I can define css variables and change them in different selectors? If so, maybe there's only coding style difference in this case, or do I miss something?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No you can totally use the host-context and do it as you did.
But I created the challenge to try css variables and see how powerful they are. Because lots of people don't know how to use them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, got it. Thanks!

@tomalaforge tomalaforge added answer answer 13 exercice styling labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

13 exercice styling answer answer

2 participants