Hi Kamila,
CSS stands for Cascading Style Sheet, so you can define styles in cascade. For instance, you can apply a class to the menu and define that for the submenu entries inside that class, they will adopt a different class value. For instance, let's take a look at this snippet taken from BaseTheme:

It is saying that all links ('a' element) with the class Menu_SubMenuItemActive that are inside an element with class Menu_DropDownPanel will have the primary color.
But you can have define a behaviour to override this:
.Menu_DropDownPanel.mygreenclass a.Menu_SubMenuItemActive {
color:green;
}
In this case if the element has both classes Menu_DropDownPanel and mygreenclass, the links with Menu_SubMenuItemActive will have the blue color.
Regarding conditional classes, You can use an expression to define a class using the attributes, like this:

Take into account that the class defined in the Style Classes property will be discarded when you use class as extended property.
Kind Regards,
João