symbols-view.less 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. @import "ui-variables";
  2. @wedge: (360 / 16);
  3. .badge-variant(@char, @num) {
  4. .symbols-view-badge-variant-@{char} {
  5. background-color: spin(@background-color-info, @wedge * @num) !important;
  6. }
  7. }
  8. // Generate 16 different badge colors.
  9. //
  10. // We need colors that vary from one another, but they need to harmonize with
  11. // the user's chosen UI theme. So we'll just use `spin` to move around the
  12. // color wheel, starting with their UI theme's own badge background color, and
  13. // varying the hue while keeping the saturation and brightness constant.
  14. .badge-variant(e('0'), 0);
  15. .badge-variant(e('1'), 1);
  16. .badge-variant(e('2'), 2);
  17. .badge-variant(e('3'), 3);
  18. .badge-variant(e('4'), 4);
  19. .badge-variant(e('5'), 5);
  20. .badge-variant(e('6'), 6);
  21. .badge-variant(e('7'), 7);
  22. .badge-variant(e('8'), 8);
  23. .badge-variant(e('9'), 9);
  24. .badge-variant(e('a'), 10);
  25. .badge-variant(e('b'), 11);
  26. .badge-variant(e('c'), 12);
  27. .badge-variant(e('d'), 13);
  28. .badge-variant(e('e'), 14);
  29. .badge-variant(e('f'), 15);
  30. // Highlight matched text
  31. .symbols-view .list-group .character-match {
  32. color: @text-color-highlight;
  33. font-weight: bold;
  34. }
  35. atom-panel.modal .symbols-view {
  36. .primary-line {
  37. display: flex !important;
  38. flex-direction: row;
  39. align-items: center;
  40. &.icon::before {
  41. margin-left: 0;
  42. }
  43. .name {
  44. text-overflow: ellipsis;
  45. overflow: hidden;
  46. white-space: pre;
  47. margin-right: auto;
  48. }
  49. .badge-container {
  50. display: block;
  51. flex-grow: 0;
  52. display: flex;
  53. flex-direction: row;
  54. .badge:not(:last-child) {
  55. margin-right: 5px;
  56. }
  57. }
  58. .badge-symbol-tag {
  59. text-transform: capitalize;
  60. }
  61. }
  62. .secondary-line {
  63. display: flex;
  64. flex-direction: row;
  65. justify-content: space-between;
  66. align-items: baseline;
  67. max-width: 100%;
  68. .location {
  69. display: block;
  70. }
  71. .context {
  72. display: block;
  73. text-overflow: ellipsis;
  74. overflow: hidden;
  75. flex-grow: 0;
  76. }
  77. }
  78. }