🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@SilasMarvin
Copy link
Contributor

No description provided.

.text-white {
color: #{$gray-100} !important;
}
.text-gradient-blue {
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a mixin for this would prevent the repetition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me update this. I haven't used mixins before

Copy link
Contributor

@levkk levkk Oct 10, 2023

Choose a reason for hiding this comment

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

classes are better than mixins, mixings generate a ton of repetitive css code, while classes inherit and cascade. That's why bootstrap has .btn and .btn-primary classes separately. .btn styles a lot of the button while .btn-primary just changes the color, which is just one or two lines of css.

Copy link
Contributor

Choose a reason for hiding this comment

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

@extend is also an option that minimizes css code (same as having two classes) and reduces the number of classes an element needs to take. If we do go with two classes here we should have the _typographic class .text-gradient then a utility class for all the gradients so they can be applies as text color, background color, border color ect.

@SilasMarvin SilasMarvin merged commit ff02581 into master Oct 10, 2023
@SilasMarvin SilasMarvin deleted the silas-new-home branch October 10, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants