Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pro:textarea): placeholder color for textarea #1512

Merged
merged 2 commits into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/pro/textarea/style/index.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '../../../components/style/mixins/placeholder.less';
@import '../../style/mixins/reset.less';

.@{pro-textarea-prefix} {
Expand Down Expand Up @@ -130,6 +131,7 @@
width: 100%;
resize: none;
overflow: hidden;
.placeholder(@textarea-placeholder-color);

&[disabled] {
cursor: not-allowed;
Copy link

Choose a reason for hiding this comment

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

the code review:

  1. At line 1, you have imported the placeholder.less mixin. This is good practice as it allows you to reuse code and keep your codebase organized.

  2. At line 130, you have added a placeholder mixin which sets the textarea-placeholder-color variable. This will help ensure consistent styling across different textareas.

  3. At line 131, you have added a statement that sets the cursor to not-allowed when the textarea is disabled. This will prevent accidental changes to the textarea while still providing feedback to the user.

Overall, this is a well written patch that ensures consistent styling and prevents accidental changes.

Copy link

Choose a reason for hiding this comment

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

  1. The code looks good and there is no obvious bug risk.
  2. It would be better to add a comment above the @import statement to indicate what the placeholder.less file contains, as it can help with understanding the code better.
  3. The statement ".placeholder(@textarea-placeholder-color);" should be added inside a media query if it is necessary to keep the code responsive.

Expand Down