Advertisement
_Cery

usage Conditional css workaround

Jun 4th, 2021
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.51 KB | None | 0 0
  1. main.uss:
  2. .col-1 {
  3.     width: 100%;
  4.     flex-grow: 0;
  5.     flex-shrink: 0;
  6. }
  7.  
  8. .col-2-1 {
  9.     width: 50%;
  10.     flex-grow: 0;
  11.     flex-shrink: 0;
  12. }
  13.  
  14. .flex-cols {
  15.     flex-direction: row;
  16.     flex-wrap: wrap;
  17. }
  18.  
  19. any uxml:
  20. <VisualElement class="flex-cols">
  21.     <Instance class="sm--col-1 lg--col-2-1" template="ProjectCard" name="player1"/>
  22.     <Instance class="sm--col-1 lg--col-2-1" template="ProjectCard" name="player1"/>
  23.     <Instance class="sm--col-1 lg--col-2-1" template="ProjectCard" name="player1"/>
  24. </VisualElement>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement