Skip to content

style: Fixed an issue with autofill style exceptions in dark backgrounds#8333

Merged
f2c-ci-robot[bot] merged 1 commit intodev-v2from
pr@dev-v2@style_auto_fill
Apr 7, 2025
Merged

style: Fixed an issue with autofill style exceptions in dark backgrounds#8333
f2c-ci-robot[bot] merged 1 commit intodev-v2from
pr@dev-v2@style_auto_fill

Conversation

@ssongliu
Copy link
Copy Markdown
Member

@ssongliu ssongliu commented Apr 7, 2025

No description provided.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 7, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

}

.el-input.is-disabled .el-input__wrapper {
--el-disabled-bg-color: var(--panel-main-bg-color-9);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are some discrepancies and optimizations suggested in the provided code:

  1. CSS Class Name Consistency: The class .el-form-item .el-input__inner:-webkit-autofill should be consistent across all stylesheets to avoid conflicts.

  2. Font Color Setting: While setting -webkit-text-fill-color for autofilled input fields is generally useful, ensure it applies only when necessary to protect user data privacy.

  3. Performance Considerations:

    • The animation effect with transition: background-color 1000s ease-out 0.5s; might cause noticeable delays on pages that frequently change their backgrounds, especially if performance becomes an issue.
    • Consider using more efficient animations like background-image transitions instead of color changes unless you specifically need visual updates during this duration.

Here's a slightly optimized version of the relevant section:

html.dark {
    background-color: var(--panel-main-bg-color-1);
    transition: background-color 0.5s ease-out 0.5s;
}

/* Ensure consistency */
.el-form-item {
    /* Add other relevant styles here if needed */
}

/* Autofill text fill color (optional) */
:root { /* Adjust scope depending on where 'var(--el-text-color-regular)' comes from */
    --el-text-color-regular: white; /* Choose a dark color if needed */
}

body [type="text"]:disabled,
input[type="text"]:disabled, /* Include disabled inputs too */
.input-group-text[data-status=editable]:disabled span.disabled-content {
    /* Additional styles or classes for disabled fields */
}

These updates address inconsistencies and offer some minor improvements while balancing readability and performance needs.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2025

Copy link
Copy Markdown
Member

@wanghe-fit2cloud wanghe-fit2cloud left a comment

Choose a reason for hiding this comment

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

/lgtm

@wanghe-fit2cloud
Copy link
Copy Markdown
Member

/approve

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented Apr 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wanghe-fit2cloud

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved label Apr 7, 2025
@f2c-ci-robot f2c-ci-robot Bot merged commit b41afc1 into dev-v2 Apr 7, 2025
6 checks passed
@f2c-ci-robot f2c-ci-robot Bot deleted the pr@dev-v2@style_auto_fill branch April 7, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants