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

Change text color of StyledClassedTextArea with css #328

Closed
firm1 opened this issue Jun 20, 2016 · 2 comments
Closed

Change text color of StyledClassedTextArea with css #328

firm1 opened this issue Jun 20, 2016 · 2 comments

Comments

@firm1
Copy link

firm1 commented Jun 20, 2016

Hi,

Thank a lot for your lib, but i have a new problem with RichTextFx. I use v0.6.10 of your lib.
I have a StyleClassedTextArea and i need to change color of text by css styling.

With this java code :

myText.getStyleClass().add("markdown-editor");

I tried try many things in css.

.markdown-editor {
    -fx-background-color:#000;
    -fx-text-fill: #FFF;
}

or

.markdown-editor {
    -fx-background-color:#000;
    -fx-fill: #FFF;
}
.markdown-editor .label{
    -fx-background-color:#000;
    -fx-text-fill: #FFF;
}

Whatever css, my background is black, but my text stay black despite my attempts.

Do you know any solution for change text color ?

@TomasMikula
Copy link
Member

Assuming myText is an instance of StyleClassedTextArea, you would need something like

.markdown-editor .text {
    -fx-fill: #FFF;
}

@firm1
Copy link
Author

firm1 commented Jun 21, 2016

Nice it works fine.

Thanks.

@firm1 firm1 closed this as completed Jun 21, 2016
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

No branches or pull requests

2 participants