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

Checkbox does not render correctly #1

Closed
shnplr opened this issue Nov 22, 2015 · 1 comment
Closed

Checkbox does not render correctly #1

shnplr opened this issue Nov 22, 2015 · 1 comment

Comments

@shnplr
Copy link

shnplr commented Nov 22, 2015

CheckBoxSkin uses css selectors "box" and "mark"

public CheckBoxSkin(CheckBox checkbox) {
    super(checkbox, new ButtonBehavior<CheckBox>(checkbox));

    box.getStyleClass().setAll("box");
    innerbox = new StackPane();
    innerbox.getStyleClass().setAll("mark");
    ...
}

however mark is being redefined in bootstrap.css as:

mark,
.mark {
  -fx-background-color: #fcf8e3;
  -fx-padding: .2em;
}

this causes the checkbox to be small and the mark is not visible - a workaround is to redefine affected check-box style e.g. from modena in your css file (loaded after bootstrapfx.css)

.check-box:selected > .box > .mark,
.check-box:indeterminate  > .box > .mark {
    -fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
}
.check-box > .box > .mark {
    -fx-background-color: null;
    -fx-padding: 0.416667em 0.416667em 0.5em 0.5em; /* 5 5 6 6 */
}
.check-box:indeterminate  > .box > .mark {
    -fx-padding: 0.666667em; /* 16x16 = 8+8 */
}
@shnplr
Copy link
Author

shnplr commented Nov 24, 2015

Hi,
I'm still seeing effect of mark in bootstrapfx.css - the size is correct but the tick mark is yellow and there is no visual difference between selected and not.

.mark {
    -fx-background-color: #ff0;
    -fx-text-fill: #000;
    -fx-fill: #000;
}

Looks to be defined in _normalize.scss

aalmiray added a commit that referenced this issue Nov 24, 2015
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

1 participant