You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

960 lines
19 KiB

  1. // If you are using IntelliJ Rider, you can simply turn on the SCSS compiler, otherwise here is how to convert scss to uss
  2. // # Install Sass
  3. // gem install sass
  4. //
  5. // # Convert
  6. // sass --sourcemap=none --style=expanded --scss --no-cache Main_Dark.scss Main_Dark.uss
  7. // sass --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss Main_Light.uss
  8. //
  9. // # Watch
  10. // sass --watch --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss:Main_Light.uss Main_Dark.scss:Main_Dark.uss
  11. //
  12. // Sass to Uss Notes
  13. // - Sass converts rgb(0,0,0) to css 'black'. Uss doesn't support named colors. The workaround is to set the color in sass as #000000
  14. //
  15. // Uss Notes
  16. // Runtime\UIElements\Managed\StyleSheets\StyleSheetCache.cs:50 to see which properties are available (until there is a doc)
  17. //--------------------------------------------------------------------------------------------------
  18. // Helper Mixins
  19. //--------------------------------------------------------------------------------------------------
  20. @mixin border($top, $right, $bottom, $left) {
  21. @if $top != 'auto' {border-top-width: $top;}
  22. @if $left != 'auto' {border-left-width: $right;}
  23. @if $bottom != 'auto' {border-bottom-width: $bottom;}
  24. @if $right != 'auto' {border-right-width: $left;}
  25. }
  26. @mixin border-box($width: 1) {
  27. @include border($width, $width, $width, $width);
  28. }
  29. @mixin padding($top, $right, $bottom, $left) {
  30. @if $top != 'auto' {padding-top: $top;}
  31. @if $left != 'auto' {padding-left: $left;}
  32. @if $bottom != 'auto' {padding-bottom: $bottom;}
  33. @if $right != 'auto' {padding-right: $right;}
  34. }
  35. @mixin padding-box($size) {
  36. @include padding($size, $size, $size, $size);
  37. }
  38. @mixin margin($top, $right, $bottom, $left) {
  39. @if $top != 'auto' {margin-top: $top;}
  40. @if $left != 'auto' {margin-left: $left;}
  41. @if $bottom != 'auto' {margin-bottom: $bottom;}
  42. @if $right != 'auto' {margin-right: $right;}
  43. }
  44. @mixin margin-box($size) {
  45. @include margin($size, $size, $size, $size);
  46. }
  47. @mixin slice($top, $right, $bottom, $left) {
  48. @if $top != 'auto' {-unity-slice-top: $top;}
  49. @if $left != 'auto' {-unity-slice-left: $left;}
  50. @if $bottom != 'auto' {-unity-slice-bottom: $bottom;}
  51. @if $right != 'auto' {-unity-slice-right: $right;}
  52. }
  53. @mixin slice-box($size) {
  54. @include slice($size, $size, $size, $size);
  55. }
  56. @mixin position($top, $right, $bottom, $left) {
  57. @if $top != 'auto' {top: $top;}
  58. @if $left != 'auto' {left: $left;}
  59. @if $bottom != 'auto' {bottom: $bottom;}
  60. @if $right != 'auto' {right: $right;}
  61. }
  62. @mixin text-clip() {
  63. overflow: hidden;
  64. }
  65. @mixin selected-element() {
  66. background-color: $unity-list-selected-background;
  67. color: $unity-text-color-highlight;
  68. }
  69. @mixin active-tab() {
  70. background-color: $unity-background-dark-contrast;
  71. color: $unity-text-color-highlight;
  72. }
  73. @mixin inactive-tab() {
  74. background-color: $unity-background-light-contrast;
  75. color: $unity-text-color;
  76. }
  77. @mixin button($top, $right, $bottom, $left) {
  78. flex: 0 0 auto;
  79. @include padding($top, $right, $bottom, $left);
  80. @include slice(4, 6, 4, 6);
  81. &.display-none {
  82. position: absolute;
  83. border-radius: 0;
  84. width: 0;
  85. height: 0;
  86. min-height: 0;
  87. max-height: 0;
  88. min-width: 0;
  89. max-width: 0;
  90. border-top-width: 0;
  91. border-left-width: 0;
  92. border-bottom-width: 0;
  93. border-right-width: 0;
  94. min-width: 0;
  95. @include border-box(0);
  96. @include padding-box(0);
  97. @include margin-box(0);
  98. @include slice-box(0);
  99. visibility: hidden;
  100. }
  101. &:hover {
  102. color: $unity-text-color;
  103. }
  104. }
  105. @mixin button-box($size) {
  106. @include button($size, $size, $size, $size);
  107. }
  108. //--------------------------------------------------------------------------------------------------
  109. // Font
  110. //--------------------------------------------------------------------------------------------------
  111. @mixin font-small() {
  112. font-size: 9;
  113. }
  114. @mixin font-normal() {
  115. font-size: 12;
  116. }
  117. //--------------------------------------------------------------------------------------------------
  118. // Styles
  119. //--------------------------------------------------------------------------------------------------
  120. #container {
  121. -unity-position: absolute;
  122. @include position(0, 0, 0, 0);
  123. }
  124. .display-none {
  125. position: absolute;
  126. overflow: hidden;
  127. border-radius: 0;
  128. width: 0;
  129. height: 0;
  130. min-height: 0;
  131. max-height: 0;
  132. min-width: 0;
  133. max-width: 0;
  134. border-top-width: 0;
  135. border-left-width: 0;
  136. border-bottom-width: 0;
  137. border-right-width: 0;
  138. @include border-box(0);
  139. @include padding-box(0);
  140. @include margin-box(0);
  141. }
  142. .row {
  143. flex: 1 0 0;
  144. flex-direction: row;
  145. }
  146. .column {
  147. flex: 1 0 0;
  148. flex-direction: column;
  149. }
  150. .tag {
  151. @include border-box(1);
  152. @include padding(1, 3, 1, 3);
  153. @include font-small();
  154. border-radius: 5;
  155. -unity-text-align: middle-center;
  156. border-color: #000000;
  157. color: #000000;
  158. }
  159. $spinner-large-size: 32;
  160. $spinner-large-half-size: 16;
  161. $spinner-normal-size: 14;
  162. $spinner-normal-half-size: 7;
  163. $toolbar-height: 18;
  164. #toolbarContainer {
  165. flex: 0 0 auto;
  166. flex-direction: row;
  167. align-items: flex-start;
  168. height: $toolbar-height;
  169. #toolbarView {
  170. flex: 1 0 0;
  171. flex-direction: row;
  172. align-items: flex-start;
  173. background-image: $toolbar-background;
  174. margin-top: -1;
  175. @include slice(1, 1, 1, 1);
  176. .toolbarButton {
  177. flex: 1 0 0;
  178. font-size: 9;
  179. -unity-text-align: middle-center;
  180. background-image: $toolbar-button-background;
  181. @include button-box(0);
  182. @include margin(0, -1, 0, 0);
  183. @include padding(0, 5, 0, 5);
  184. height: 19;
  185. &.space {
  186. margin-left: 7;
  187. }
  188. &.active {
  189. background-image: $toolbar-button-active-background;
  190. }
  191. &.pulldown {
  192. &:active {
  193. background-image: $toolbar-button-background;
  194. }
  195. }
  196. }
  197. #toolbarLeft {
  198. flex: 0 0 auto;
  199. flex-direction: row;
  200. align-items: flex-start;
  201. }
  202. #toolbarRight {
  203. flex: 1 0 0;
  204. flex-direction: row;
  205. justify-content: flex-end;
  206. #toolbarSearch {
  207. flex: 1 0 0;
  208. height: $toolbar-height;
  209. max-width: 500;
  210. flex-direction: row;
  211. @include margin(0, 5, 0, 0);
  212. }
  213. }
  214. }
  215. }
  216. #searchContainer {
  217. flex: 1 0 0;
  218. flex-direction: row;
  219. align-items: center;
  220. justify-content: flex-start;
  221. height: 14;
  222. @include margin(0, 0, 0, 0);
  223. #searchTextField {
  224. flex: 1 0 0;
  225. font-size: 9;
  226. background-image: $toolbar-search-textfield-background;
  227. @include margin(2, 5, 1, 5);
  228. @include padding(2, 17, 1, 17);
  229. @include slice(1, 0, 1, 14);
  230. height: 14;
  231. &:focus {
  232. background-image: $toolbar-search-textfield-focus-background;
  233. }
  234. &.placeholder {
  235. color: $unity-background-dark-contrast;
  236. }
  237. }
  238. #searchCancelButton {
  239. width: 14;
  240. height: 15;
  241. background-image: $toolbar-search-cancel-off-background;
  242. @include button-box(0);
  243. @include slice(1, 14, 1, 0);
  244. @include margin(3, 0, 2, -10);
  245. @include padding-box(0);
  246. @include border-box(0);
  247. &.on {
  248. background-image: $toolbar-search-cancel-background;
  249. }
  250. &:active {
  251. background-image: $toolbar-search-cancel-active-background;
  252. }
  253. }
  254. }
  255. #detailListView {
  256. flex: 1 0 0;
  257. flex-direction: row;
  258. .link {
  259. color: $link-text-color;
  260. background: rgba(0, 0, 0, 0);
  261. background-image: none;
  262. @include margin-box(0);
  263. @include padding-box(0);
  264. cursor: link;
  265. }
  266. .emptyArea {
  267. flex: 1 0 0;
  268. @extend .column;
  269. .title {
  270. -unity-text-align: middle-center;
  271. font-size: 14;
  272. }
  273. .loading {
  274. -unity-position: relative;
  275. @include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size);
  276. @include border-box(0);
  277. @include padding-box(0);
  278. @include margin-box(0);
  279. @include slice-box(0);
  280. width: $spinner-normal-size;
  281. height: $spinner-normal-size;
  282. max-width: $spinner-normal-size;
  283. max-height: $spinner-normal-size;
  284. }
  285. }
  286. #headerTitle {
  287. flex: 1 0 0;
  288. font-size: 12;
  289. -unity-font-style: bold;
  290. color: $unity-text-color;
  291. }
  292. #headerCaret {
  293. flex: 0 0 auto;
  294. font-size: 12;
  295. -unity-font-style: bold;
  296. color: $unity-text-color;
  297. min-width: 16;
  298. }
  299. #spinnerContainer {
  300. -unity-position: absolute;
  301. @include position(3, 0, auto, 2);
  302. width: 14;
  303. flex: 0.1 0 0;
  304. flex-direction: column;
  305. align-items: center;
  306. }
  307. .loading {
  308. -unity-position: relative;
  309. @include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size);
  310. @include border-box(0);
  311. @include padding-box(0);
  312. @include margin-box(0);
  313. @include slice-box(0);
  314. width: $spinner-normal-size;
  315. height: $spinner-normal-size;
  316. max-width: $spinner-normal-size;
  317. max-height: $spinner-normal-size;
  318. }
  319. .combo {
  320. @extend .row;
  321. @include margin-box(3);
  322. @include padding-box(3);
  323. .popup {
  324. @include padding(0, 0, 0, 8);
  325. @include margin-box(0);
  326. border-top-width-left-radius: 0;
  327. border-bottom-width-left-radius: 0;
  328. }
  329. .button {
  330. flex: 1 0 0; // Make buttons take all the parent's free space
  331. @include font-normal();
  332. @include border-box(0);
  333. @include margin-box(0);
  334. @include padding(2, 6, 3, 6);
  335. @include slice(4, $background-button-slice-middle, 4, $background-button-slice-middle);
  336. -unity-text-align: middle-center;
  337. border-left-width: 0;
  338. border-top-width: 0;
  339. border-right-width: 0;
  340. border-bottom-width: 0;
  341. background-image: $background-mid-button;
  342. border-top-width-right-radius: 0;
  343. border-bottom-width-right-radius: 0;
  344. border-top-width-left-radius: 0;
  345. border-bottom-width-left-radius: 0;
  346. &.selected {
  347. background-image: $background-mid-button-selected;
  348. color: $unity-text-color-highlight;
  349. }
  350. &.first {
  351. @include slice(4, $background-button-slice-right, 4, 6);
  352. background-image: $background-left-button;
  353. &.selected {
  354. background-image: $background-left-button-selected;
  355. }
  356. }
  357. &.last {
  358. @include slice(4, 6, 4, $background-button-slice-left);
  359. background-image: $background-right-button;
  360. &.selected {
  361. background-image: $background-right-button-selected;
  362. }
  363. }
  364. &.small {
  365. flex: 0.5 0 0;
  366. @include padding(0, 0, 0, 0);
  367. }
  368. }
  369. }
  370. //--------------------------------------------------------------------------------------------------
  371. // Package List
  372. //--------------------------------------------------------------------------------------------------
  373. #packageListGroup {
  374. width: 270;
  375. #listContainerOuter {
  376. @extend .column;
  377. }
  378. #groupContainerOuter {
  379. #headerContainer {
  380. flex: 1 0 0;
  381. flex-direction: row;
  382. align-items: center;
  383. border-color: rgba(0,0,0, 0.5);
  384. #headerTitle {
  385. height: 0;
  386. @include margin-box(0);
  387. @include padding-box(0);
  388. @include border-box(0);
  389. }
  390. }
  391. #groupContainer {
  392. @include margin(0, 0, 0, 0);
  393. }
  394. }
  395. #packageList, #listContainer, #listGroups {
  396. @extend .column;
  397. }
  398. #scrollView {
  399. @extend .column;
  400. #VerticalScroller {
  401. bottom: 0;
  402. }
  403. #HorizontalScroller {
  404. height: 0;
  405. }
  406. #ContentViewport {
  407. bottom: 0;
  408. #ContentView {
  409. right: 0;
  410. left: 0;
  411. }
  412. }
  413. }
  414. #noResult {
  415. #noResultText {
  416. -unity-word-wrap: true;
  417. }
  418. }
  419. }
  420. //--------------------------------------------------------------------------------------------------
  421. // Package Item
  422. //--------------------------------------------------------------------------------------------------
  423. .package {
  424. flex: 1 0 0;
  425. flex-direction: row;
  426. align-items: center;
  427. @include margin(0, 0, 0, 0);
  428. border-color: rgba(0,0,0, 0.5);
  429. border-bottom-width: 1;
  430. &.selected {
  431. @include selected-element();
  432. #packageName, #packageVersion {
  433. color: $unity-text-color-highlight;
  434. }
  435. }
  436. .status {
  437. flex: 0 0 14;
  438. width: 14;
  439. height: 14;
  440. @include margin(auto, 0, auto, 2);
  441. &.installed {
  442. background-image: $installed-package-background;
  443. &.no-icon {
  444. background-image: none;
  445. }
  446. }
  447. &.outdated {
  448. background-image: $background-status-outdated;
  449. &.no-icon {
  450. background-image: none;
  451. }
  452. }
  453. &.inprogress {
  454. background-image: none;
  455. }
  456. &.error {
  457. background-image: $background-status-error;
  458. }
  459. }
  460. .name {
  461. flex: 1 0 0;
  462. @include font-normal();
  463. @include margin(auto, 5, auto, 0);
  464. @include text-clip();
  465. }
  466. .version {
  467. flex: 0 0 auto;
  468. @include margin(auto, 5, auto, 0);
  469. @include font-small;
  470. }
  471. }
  472. //--------------------------------------------------------------------------------------------------
  473. // Package Details
  474. //--------------------------------------------------------------------------------------------------
  475. #detailsGroup {
  476. flex: 1 0 0;
  477. border-left-width: 1px;
  478. border-color: rgba(0,0,0, 0.5);
  479. #detailsContainer {
  480. flex: 1 0 0;
  481. flex-direction: column;
  482. -unity-position: relative;
  483. }
  484. }
  485. #detailView {
  486. flex: 1 0 0;
  487. #VerticalScroller {
  488. bottom: 0;
  489. }
  490. #ContentViewport {
  491. #ContentView {
  492. -unity-position: absolute;
  493. @include position(0, 0, auto, 0);
  494. }
  495. }
  496. .detail {
  497. flex: 1 0 0;
  498. flex-direction: column;
  499. @include padding-box(5);
  500. .header {
  501. flex: 1 0 0;
  502. flex-direction: row;
  503. align-items: flex-start;
  504. margin-bottom: 8;
  505. #titleContainer {
  506. flex: 0.9 0 0;
  507. #detailTitle {
  508. font-size: 18;
  509. -unity-font-style: bold;
  510. -unity-word-wrap: true;
  511. @include margin(0, 0, 0, 4);
  512. }
  513. }
  514. $controls-height: 19;
  515. #detailsControls {
  516. flex: 1 0 0;
  517. height: $controls-height;
  518. flex-direction: row;
  519. align-items: center;
  520. flex-wrap: wrap;
  521. @include margin(3, 0, 0, 0);
  522. }
  523. #updateCombo {
  524. flex: 1 0 0;
  525. height: $controls-height;
  526. align-items: center;
  527. @include margin(0, 0, 0, 0);
  528. @include padding(0, 0, 0, 0);
  529. #update {
  530. flex: 0 0 auto;
  531. }
  532. #updateDropdownContainer {
  533. min-width: 65;
  534. max-width: 150;
  535. height: $controls-height;
  536. flex: 0 0 auto;
  537. .popup {
  538. @include font-normal();
  539. height: $controls-height;
  540. &:focus {
  541. background-image: $popup-background;
  542. }
  543. &:hover {
  544. .textElement {
  545. color: $unity-text-color;
  546. }
  547. }
  548. .textElement {
  549. margin-top: 2;
  550. }
  551. }
  552. }
  553. .action {
  554. flex: 0 0 auto;
  555. @include margin-box(0);
  556. @include font-normal();
  557. @include padding(2, 4, 3, 4);
  558. right: -3;
  559. &:hover {
  560. color: $unity-text-color;
  561. }
  562. }
  563. }
  564. #updateContainer {
  565. height: $controls-height;
  566. flex: 1 0 0;
  567. align-items: flex-end;
  568. @include padding-box(0);
  569. }
  570. .button {
  571. height: $controls-height;
  572. @include font-normal();
  573. @include button(3,3,4,3);
  574. }
  575. }
  576. #detailVersion {
  577. font-size: 16;
  578. max-height: 30;
  579. }
  580. #detailName {
  581. flex: 1 0 0;
  582. max-height: 20;
  583. -unity-font-style: italic;
  584. }
  585. #detailPackageStatus {
  586. flex: 1 0 0;
  587. -unity-font-style: bold;
  588. -unity-word-wrap: true;
  589. }
  590. #detailTag {
  591. width: 60;
  592. @include font-normal();
  593. border-radius: 5;
  594. border-color: rgb(180, 180, 180);
  595. @include border-box(2);
  596. -unity-text-align: middle-center;
  597. }
  598. #detailDesc, #detailModuleReference {
  599. flex: 1 0 0;
  600. @include font-normal();
  601. -unity-word-wrap: true;
  602. &.empty {
  603. -unity-font-style: italic;
  604. }
  605. }
  606. #detailAuthor {
  607. flex: 1 0 0;
  608. @include font-normal();
  609. -unity-word-wrap: true;
  610. }
  611. #detailCategory {
  612. flex: 1 0 0;
  613. @include font-normal();
  614. -unity-word-wrap: true;
  615. @include margin(auto, auto, 5, auto);
  616. }
  617. #changeLogContainer, #viewLicensesContainer {
  618. flex: 0 0 auto;
  619. flex-direction: row;
  620. }
  621. #detailActions, .detailActions {
  622. flex: 0 0 auto;
  623. flex-direction: row;
  624. margin-left: 2;
  625. @extend .row;
  626. .detailAction {
  627. @include margin(auto, 0, auto, 0);
  628. @include padding(auto, 2, auto, 2);
  629. border-left-width: 2;
  630. border-right-width: 2;
  631. }
  632. .detailActionSeparator {
  633. @include margin(auto, 0, auto, 0);
  634. @include padding(auto, 0, auto, 0);
  635. border-left-width: 0;
  636. border-right-width: 0;
  637. }
  638. #thirdPartyNoticeLabel {
  639. @include margin(4, 0, 4, 0);
  640. @include padding-box(0);
  641. -unity-word-wrap: true;
  642. }
  643. #viewThirdParty {
  644. border-right-width: 0;
  645. }
  646. }
  647. .versionContainer {
  648. @extend .row;
  649. align-items: center;
  650. justify-content: flex-start;
  651. #detailVersion {
  652. flex: 0 0 auto;
  653. }
  654. }
  655. .tag {
  656. border-color: $package-tag-color;
  657. color: $package-tag-color;
  658. &.verified {
  659. border-color: $package-tag-recommended-color;
  660. color: $package-tag-recommended-color;
  661. }
  662. }
  663. .tagLines {
  664. }
  665. .tagLine {
  666. flex: 0 0 auto;
  667. flex-direction: row;
  668. }
  669. .tagContainer {
  670. }
  671. }
  672. }
  673. #detailError {
  674. -unity-position: absolute;
  675. @include position(5, 5, auto, 5);
  676. min-height: 200;
  677. -unity-word-wrap: true;
  678. &.display-none {
  679. @include position(0, 0, 0, 0);
  680. width: 0;
  681. height: 0;
  682. min-height: 0;
  683. max-height: 0;
  684. @include border-box(0);
  685. @include padding-box(0);
  686. @include margin-box(0);
  687. }
  688. }
  689. #packageStatusBar {
  690. -unity-position: relative;
  691. flex: 0 0 auto;
  692. @include margin(2, 0, 0, 0);
  693. border-color: rgba(0, 0, 0, 0.5);
  694. @include border(1, 0, 0, 0);
  695. }
  696. #statusBarContainer {
  697. flex-direction: row;
  698. align-items: center;
  699. justify-content: space-between;
  700. #loadingContainer{
  701. flex-direction: row;
  702. align-items: center;
  703. justify-content: flex-start;
  704. margin-left: 2;
  705. #loadingIcon {
  706. background-image: $background-status-error;
  707. width: 16;
  708. height: 16;
  709. margin-left: -12;
  710. margin-right: 0;
  711. }
  712. #loadingText {
  713. padding-left: 2;
  714. -unity-font-style: italic;
  715. &.icon {
  716. margin-left: 0;
  717. }
  718. }
  719. }
  720. #moreAddOptionsButton {
  721. font-size: 16;
  722. background-image: none;
  723. @include margin(0, 0, -2, 0);
  724. @include padding(3, 6, 6, 6);
  725. border-color: rgba(0, 0, 0, 0.5);
  726. @include border(0, 1, 0, 0);
  727. }
  728. }
  729. #packageAddFromUrlField {
  730. -unity-position: absolute;
  731. @include position(-35, 0, 0, 0);
  732. }
  733. #addFromUrlFieldContainer {
  734. border-color: rgba(0, 0, 0, 0.5);
  735. @include border(1, 0, 1, 0);
  736. flex-direction: row;
  737. justify-content: space-between;
  738. align-items: center;
  739. height: 35;
  740. background-color: $unity-background;
  741. #urlTextField {
  742. flex: 1 0 0;
  743. height: 20;
  744. -unity-text-align: middle-left;
  745. }
  746. #addFromUrlButton {
  747. flex: 0 0 auto;
  748. height: 20;
  749. }
  750. }
  751. }
  752. .alert {
  753. background-color: rgba(200,0,0,0.8);
  754. border-color: #FF0000;
  755. flex-direction: row;
  756. @include border-box(1);
  757. @include padding(5, 10, 5, 10);
  758. #alertMessage {
  759. flex: 1 0 0;
  760. color: $unity-text-color-highlight;
  761. -unity-word-wrap: true;
  762. @include text-clip();
  763. }
  764. #close {
  765. flex: 0 0 auto;
  766. max-height: 30;
  767. @include position(auto, auto, auto, 5);
  768. @include button(3,3,4,3);
  769. }
  770. }
  771. .spinner {
  772. flex: 0 0 auto;
  773. @include position(-$spinner-normal-half-size, auto, auto, -$spinner-normal-half-size);
  774. min-width: $spinner-normal-size;
  775. min-height: $spinner-normal-size;
  776. max-width: $spinner-normal-size;
  777. max-height: $spinner-normal-size;
  778. background-image: $background-spinner-normal;
  779. }
  780. .largeSpinner {
  781. flex: 0 0 auto;
  782. @include position(-$spinner-large-half-size, auto, auto, -$spinner-large-half-size);
  783. min-width: $spinner-large-size;
  784. min-height: $spinner-large-size;
  785. max-width: $spinner-large-size;
  786. max-height: $spinner-large-size;
  787. background-image: $background-spinner-large;
  788. }