Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(form-control): fix disabled placeholder color#5752

Merged
mcoker merged 5 commits intopatternfly:mainfrom
srambach:5629-select-placeholder-color
Aug 3, 2023
Merged

fix(form-control): fix disabled placeholder color#5752
mcoker merged 5 commits intopatternfly:mainfrom
srambach:5629-select-placeholder-color

Conversation

@srambach
Copy link
Member

@srambach srambach commented Jul 11, 2023

Add pf-m-placeholder to a disabled form control to test.
This also removes the color set on the child of a select - this didn't seem to do anything anywhere so please comment if you know the original purpose of this.

Fixes #5629

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jul 11, 2023

@srambach srambach force-pushed the 5629-select-placeholder-color branch from 6457802 to 5e1fd8f Compare July 19, 2023 13:45
Comment on lines 272 to 274
&:disabled {
--#{$form-control}--Color: var(--#{$form-control}--m-disabled--Color);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Another way you could do this is define the placeholder color when disabled.

diff --git a/src/patternfly/components/FormControl/form-control.scss b/src/patternfly/components/FormControl/form-control.scss
index 6d8e95996..a5bd1b2a2 100644
--- a/src/patternfly/components/FormControl/form-control.scss
+++ b/src/patternfly/components/FormControl/form-control.scss
@@ -206,6 +206,7 @@
   &.pf-m-disabled {
     --#{$form-control}--BackgroundColor: var(--#{$form-control}--m-disabled--BackgroundColor);
     --#{$form-control}--Color: var(--#{$form-control}--m-disabled--Color);
+    --#{$form-control}--m-placeholder--Color: var(--#{$form-control}--m-disabled--Color);
     --#{$form-control}__toggle-icon--Color: var(--#{$form-control}--m-disabled__toggle-icon--Color);
     --#{$form-control}--before--BorderStyle: none;
     --#{$form-control}--after--BorderStyle: none;

@srambach srambach requested a review from mcoker August 2, 2023 19:09
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Just one small nit

Comment on lines 280 to 281
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit - looks like some extra whitespace was added here

Suggested change
}
}
}
}

@srambach srambach requested a review from mcoker August 3, 2023 13:44
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

🎃👍

@mcoker mcoker merged commit 4f8c7e6 into patternfly:main Aug 3, 2023
@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 5.1.0-prerelease.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

mattnolting pushed a commit to mattnolting/patternfly that referenced this pull request Dec 12, 2023
@srambach srambach deleted the 5629-select-placeholder-color branch April 6, 2024 02:23
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.

Form control - select placeholder color overriding disabled color

4 participants