Search Issue Tracker

Fixed

Votes

0

Found in

2020.2

2020.2.1f1

2021.1

2021.2

Issue ID

1312500

Regression

No

USS file parsing stops when it encounters an unknown CSS parameter

UI Toolkit

-

Reproduction steps:
1. Open attached project "1312500.zip"
2. Open "TestStyleSheet.uss" from the Assets folder in any code editor (e.g. Visual Studio)
3. Notice how the 7th line has the "color" parameter set to red and is centered in middle with other properties
4. Open "TestWindow.uxml" from the Assets folder (UI Builder package is required to view this window)
5. Notice how all style parameters set in "TestStyleSheet.uss" work
6. Open "TestStyleSheet.uss" again and add an additional parameter "font-weight: bold;" right above "color" parameter
7. Save the file and look at "TestWindow.xuml" again

Expected result: Font weight is not set, because it's not used in Unity UI Toolkit, but the color is still set to red
Actual result: Font weight is not set as expected, but color also doesn't get set because USS parsing stops

Reproducible with: 1.0.0-preview.11 (2020.2.6f1, 2021.1.0b8, 2021.2.0a6), 1.0.0-preview.13 (2020.2.1f1, 2020.2.6f1, 2021.1.0b8, 2021.2.0a6), 1.0.0-preview.14 (2020.2.6f1, 2021.1.0b8, 2021.2.0a6)
Couldn't test with: 2018.4, 2019.4 (UI Toolkit is not available)

  1. Resolution Note:

    Fixed in 2021.2.0a15

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.