Skip to content

Comments

Changes pseudo.css (chapter 7)#19

Open
dgruntz wants to merge 2 commits intoeppleton:masterfrom
dgruntz:kap-7
Open

Changes pseudo.css (chapter 7)#19
dgruntz wants to merge 2 commits intoeppleton:masterfrom
dgruntz:kap-7

Conversation

@dgruntz
Copy link
Contributor

@dgruntz dgruntz commented Aug 15, 2018

The code defines the used customRegion to be of type "my", therefore this type should be used in the css file, otherwise, the line
customRegion.getStyleClass().add("my");
could be deleted.

As an alternative, both declarations could be shown by defining

.my:active{
-fx-background-color: red;
-fx-opacity: 1;
}

CustomRegion:active{
-fx-background-color: blue;
-fx-opacity: 1;
}

If the "my" style is not assigned, then the color would be set to blue.

dgruntz added 2 commits August 5, 2018 12:37
The code defines the used customRegion to be of type "my", therefore
this type should be used in the css file. Otherweise, the line
        customRegion.getStyleClass().add("my");
could be deleted.

As an alternative, both declarations could be shown by defining

   .my:active{
       -fx-background-color: red;
       -fx-opacity: 1;
   }

   CustomRegion:active{
       -fx-background-color: blue;
       -fx-opacity: 1;
   }

If the "my" style is not assigned, then the color changes to blue.
In the book, the padding of the label is definid as
    -fx-padding: 4 4 0 4;
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

Successfully merging this pull request may close these issues.

1 participant