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

Card elevated-n CSS bug? #95

Open
credmond opened this issue May 6, 2024 · 0 comments
Open

Card elevated-n CSS bug? #95

credmond opened this issue May 6, 2024 · 0 comments

Comments

@credmond
Copy link

credmond commented May 6, 2024

There seems to be a bug with Card elevation CSS.

For example, the generated CSS (i.e., Card CSS in the JAR) is:

.card > .container.elevated-1 {
  -fx-effect: dropshadow(three-pass-box, -color-shadow-default, 2px, 0.5, 0, 2);
}

But setting an elevation style as documented, by doing something like:

 var card1 = new Card();
        card1.getStyleClass().add(Styles.ELEVATED_1);

... is obviously nothing going to work from that -- the "container" (a VBox inside the Card) does not have the "elevated-1" style applied, the Card itself does. So the CSS would need to be:

.card.elevated-1 > .container {
  -fx-effect: dropshadow(three-pass-box, -color-shadow-default, 2px, 0.5, 0, 2);
}

...for example. Am I missing something?

There is a global set of elevated-n styles, which are actually what get applied instead -- and probably why this has gone unnoticed, e.g.:

.elevated-2 {
  -fx-effect: dropshadow(three-pass-box, -color-shadow-default, 8px, 0.5, 0, 2);
}

Same issue applies for "interactive".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants