Search Unity

A few questions regarding future support for some CSS attributes

Discussion in 'UI Toolkit' started by arlefreak, Apr 2, 2020.

  1. arlefreak

    arlefreak

    Joined:
    Nov 28, 2013
    Posts:
    6
    First of all the new UI Toolkit looks really promising, congrats on great results by the team.

    I would like to know if the following CSS properties are planned to be supported

    - box-shadow
    - border-style
    - border-image

    Also some CSS selectors like

    - nth-child()
    - not()

    for example a very useful selector in web dev is

    Code (CSharp):
    1. .button:not(:last-child) {
    2.   margin-button: 8px;
    3. }
    More Units

    vh, vw, em, rem

    Media queries ?

    Code (CSharp):
    1.  
    2. @media screen and (min-width: 700px) {
    3.    .button {
    4.        background: red;
    5.     }
    6. }
    And for the xml part of things, I see there doesn't seem to be any Image native elements, is there any plans to add one ? It could be very useful as sometimes we use images to drive the size of the containers.

    I don't expect all the CSS features to be supported by USS but would be nice to know which ones are planned.
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    All the features you mentioned are on the table (as they make sense are useful) but are not our highest priority for the initial package release later this year. If we work on these, it will be after the release (so not soon).
     
    farda_games likes this.
  3. farda_games

    farda_games

    Joined:
    Mar 12, 2020
    Posts:
    1
    Ok, thanks for the reply :)