Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Apr 17, 2025

Fixed: Cloud Async Card Style

@fit2bot fit2bot requested a review from a team April 17, 2025 09:55
@ZhaoJiSen ZhaoJiSen merged commit 82d618c into dev Apr 17, 2025
3 of 4 checks passed
@ZhaoJiSen ZhaoJiSen deleted the pr@dev@fix_card_style branch April 17, 2025 09:55

.el-form {
margin-top: unset;
}
}
</style>
Copy link
Member

Choose a reason for hiding this comment

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

The code appears to be using SCSS (SASS) variables defined globally outside of any element declarations like so:

  1. It's not recommended to define SCSS global vars directly in html files as it conflicts with CSS-in-JS.
    Instead, they should only be used within the specific elements that will affect them.

  2. The second line of SCSS contains an additional variable which is potentially confusing since no existing element declaration exists for .el-card__header or ...__body.
    If this was indeed meant to refer to another class (e.g., .el-header, .el-body) you could replace it with actual classes if necessary but also document what it's supposed to do otherwise, especially when working on large projects.

  3. In general: Ensure each new style sheet has its own unique ID or selector to avoid name collisions across different scss components and prevent issues such as overlapping styles affecting the current scope. For example, instead of multiple instances using $themeColor:

:-webkit-any-element {
  color: $themeColor !important; /* Safari */
}
/* More similar styles...

Copy link

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.

3 participants