Search Unity

Feature Request Reset Standard Styles

Discussion in 'UIElements' started by Devi-User, Dec 22, 2018.

  1. Devi-User


    Apr 30, 2016
    I encounter a problem in which standard elements define styles that I cannot remove in any other way except by knowing the names of the styles beforehand (these are magic words, and there is no guarantee that tomorrow they will not be renamed to something else) and manipulating above code.
    I cannot remove any already set values in uss, if I am generally satisfied with the standard style, but I would like to change it a bit. For example, if a standard element uses the height field, and I want my element to not use it at all.
    I also can not disable styles from uxml.
    It annoys me a little, since this moment is still related to the appearance of the element, but I have to describe it in C # knowing in advance that the elements under the hood.
    I have a few suggestions on how to change this situation, for example, expanding uss, allowing you to return values as "not specified", or add a bool-attribute that indicates whether we need standard styles or not, or an attribute in which we could exclude certain classes. Perhaps these solutions are wild, and you have better ideas. All I ask is for us to think about if some other solution to this problem is possible except using C #.
  2. jonathanma_unity


    Unity Technologies

    Jan 7, 2019
    Hi, a feature to make user styles have precedence was integrated into the main line last month.

    With this feature any style that you set will have priority over the standard Unity styles.