Skip to content

Add UXML and USS #919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

Add UXML and USS #919

merged 1 commit into from
Jun 11, 2025

Conversation

Svarshick
Copy link
Contributor

UXML+USS are markup and sheet languages for the Unity Game Engine (like HTML+CSS)

  1. UXML is inspired by HTML, XAML and XML
  2. USS is similar to CSS

File extensions

  1. UXML : .uxml
  2. USS : .uss

@AlDanial
Copy link
Owner

Can you point me to small UXML and USS files with various comments that I can use for the test suite?

@Svarshick
Copy link
Contributor Author

Unfortunately, I couldn't find any official UXML/USS examples with comments., so I created some simple ones

  1. UXMl example
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
    <!-- Importing styles from uss file -->
    <Style src="project://database/Assets/UI/Resources/common.uss?fileID=7433441132597879392&amp;guid=c5fd8770b48bac1e48d6087c0a2e0230&amp;type=3#common" />
    <!-- Instantiating build-in control (Button) -->
    <ui:Button text="Choose me" name="choice" />
</ui:UXML>
  1. USS example
/* name selector (like ID selector in CSS) */
#root {
    /* 
    some style
    this is an example of a multiline comment 
    */
}

/* class selector (like in CSS) */
.hidden {
    display: none;
}

@AlDanial AlDanial merged commit f756e28 into AlDanial:master Jun 11, 2025
1 check passed
AlDanial added a commit that referenced this pull request Jun 11, 2025
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.

2 participants