Toolbar.css 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. * Copyright (C) 2013 Apple Inc. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. * 1. Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * 2. Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. *
  13. * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
  14. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  15. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  16. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
  17. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  18. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  19. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  20. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  21. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  22. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  23. * THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. .toolbar {
  26. display: -webkit-flex;
  27. white-space: nowrap;
  28. overflow: hidden;
  29. border-bottom: 1px solid rgb(85, 85, 85);
  30. outline: none;
  31. }
  32. .toolbar.icon-and-label-vertical {
  33. height: 56px;
  34. }
  35. .toolbar.icon-and-label-vertical.small-size {
  36. height: 48px;
  37. }
  38. .toolbar.icon-and-label-horizontal,
  39. .toolbar.icon-only {
  40. height: 40px;
  41. }
  42. .toolbar.icon-and-label-horizontal.small-size,
  43. .toolbar.icon-only.small-size,
  44. .toolbar.label-only {
  45. height: 32px;
  46. }
  47. body.docked .toolbar {
  48. background-image: -webkit-linear-gradient(top, rgb(216, 216, 216), rgb(190, 190, 190));
  49. box-shadow: inset rgba(255, 255, 255, 0.1) 0 1px 0, inset rgba(0, 0, 0, 0.02) 0 -1px 0;
  50. }
  51. body:not(.docked) .toolbar .item.button > .label {
  52. /* We need to disable sub-pixel antialiasing in the toolbar when not docked because the
  53. toolbar is transparent and so is the WebView. */
  54. -webkit-font-smoothing: antialiased;
  55. /* Compensate for the text not being sub-pixel antialiased by adding a small stroke. */
  56. -webkit-text-stroke: 0.2px;
  57. }
  58. body.window-inactive .toolbar {
  59. border-bottom: 1px solid rgb(128, 128, 128);
  60. }
  61. .toolbar .control-section {
  62. display: -webkit-flex;
  63. -webkit-flex-direction: column;
  64. -webkit-align-items: center;
  65. -webkit-justify-content: center;
  66. padding-left: 6px;
  67. padding-right: 6px;
  68. min-width: -webkit-min-content;
  69. }
  70. .toolbar.icon-and-label-horizontal.small-size .control-section,
  71. .toolbar.icon-only.small-size .control-section,
  72. .toolbar.label-only .control-section {
  73. -webkit-flex-direction: row;
  74. }
  75. .toolbar .item-section {
  76. display: -webkit-flex;
  77. min-width: -webkit-min-content;
  78. }
  79. .toolbar .item-section:not(.center) {
  80. -webkit-flex: 1;
  81. }
  82. .toolbar .item-section.left {
  83. -webkit-justify-content: flex-start;
  84. margin-right: 12px;
  85. }
  86. .toolbar .item-section.center {
  87. -webkit-flex: 2;
  88. -webkit-justify-content: center;
  89. }
  90. .toolbar .item-section.right {
  91. -webkit-justify-content: flex-end;
  92. margin-left: 12px;
  93. margin-right: 12px;
  94. }
  95. .toolbar .item {
  96. display: -webkit-flex;
  97. outline: none;
  98. }