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

bug: ion-textarea custom style not working for help or count #3112

Closed
StefaniToto opened this issue Sep 11, 2023 · 2 comments · Fixed by #3199
Closed

bug: ion-textarea custom style not working for help or count #3112

StefaniToto opened this issue Sep 11, 2023 · 2 comments · Fixed by #3199
Labels
content Issues related to the contents of the documentation website

Comments

@StefaniToto
Copy link

Describe the Bug

Based on ionic documentation we can access and change the attributes of count and error .
https://ionicframework.com/docs/api/textarea

Below is a demo to change the size and color.

https://stackblitz.com/edit/angular-dhulrr-hexdmn?file=src%2Fapp%2Fexample.component.css,src%2Fapp%2Fexample.component.html

Expected Behavior

`ion-textarea.custom {
--background: #373737;
--color: #fff;
--padding-end: 10px;
--padding-start: 10px;
--placeholder-color: #ddd;
--placeholder-opacity: 0.8;
}

ion-textarea.custom .helper-text,
ion-textarea.custom .counter {
color: red !important;
font-size: 24px !important;
}`

Is expected to change the the style of helper and counter

Steps to Reproduce

Latest stackblitz from ionic documentation

Screenshots

image

Operating System

windows

Browser

firefox, chrome

Version

No response

Additional Information

No response

@StefaniToto StefaniToto added the triage New issues label Sep 11, 2023
@mapsandapps mapsandapps self-assigned this Sep 12, 2023
@mapsandapps
Copy link
Contributor

Hi, thank you for the report! I can see that this example in the docs is not working in Angular. Angular encapsulation is preventing the helper-text class from getting the styles applied to it. You can fix this in the Stackblitz by moving

ion-textarea.custom .helper-text,
ion-textarea.custom .counter {
  color: red !important;
  font-size: 24px !important;
}

into the global.css file.

We need to update the docs to address this and also change the specificity to remove the requirement of !important.

@mapsandapps mapsandapps added the content Issues related to the contents of the documentation website label Sep 12, 2023
@ionitron-bot ionitron-bot bot removed the triage New issues label Sep 12, 2023
@mapsandapps mapsandapps removed their assignment Sep 12, 2023
@liamdebeasi
Copy link
Contributor

Thanks for reporting this! This is fixed in #3199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues related to the contents of the documentation website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants