title-bar.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @import "ui-variables";
  2. @title-bar-height: 22px;
  3. @traffic-lights-width: 68px;
  4. @inset-title-bar-height: 38px;
  5. @inset-traffic-lights-width: 78px;
  6. @title-bar-text-size: 13px;
  7. @title-bar-background-color: @base-background-color;
  8. @title-bar-border-color: @base-border-color;
  9. // Title Bar -------------------------------
  10. .title-bar {
  11. display: flex;
  12. flex-shrink: 0;
  13. align-items: center;
  14. justify-content: center;
  15. overflow: hidden;
  16. box-sizing: content-box;
  17. font-size: @title-bar-text-size;
  18. background-color: @title-bar-background-color;
  19. border-bottom: 1px solid @title-bar-border-color;
  20. transition: margin-top 160ms;
  21. -webkit-user-select: none;
  22. -webkit-app-region: drag;
  23. .title {
  24. flex: 0 1 auto;
  25. overflow: hidden;
  26. white-space: nowrap;
  27. text-overflow: ellipsis;
  28. }
  29. .is-blurred & {
  30. color: @text-color-subtle;
  31. }
  32. }
  33. // Custom -------------------------------
  34. .custom-title-bar {
  35. .title-bar {
  36. height: @title-bar-height;
  37. padding-left: @traffic-lights-width;
  38. padding-right: @traffic-lights-width;
  39. }
  40. &.fullscreen .title-bar {
  41. margin-top: -@title-bar-height; // hide title bar in fullscreen mode
  42. }
  43. atom-panel.modal {
  44. top: @title-bar-height; // Move modals down
  45. }
  46. }
  47. // Custom Inset -------------------------------
  48. .custom-inset-title-bar {
  49. .title-bar {
  50. height: @inset-title-bar-height;
  51. padding-left: @inset-traffic-lights-width;
  52. padding-right: @inset-traffic-lights-width;
  53. }
  54. &.fullscreen .title-bar {
  55. margin-top: -@inset-title-bar-height; // hide title bar in fullscreen mode
  56. }
  57. atom-panel.modal {
  58. top: @inset-title-bar-height; // Move modals down
  59. }
  60. }
  61. // Hidden -------------------------------
  62. .hidden-title-bar {
  63. .status-bar {
  64. -webkit-app-region: drag; // Enable dragging
  65. }
  66. }