not really known
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.

243 lines
5.7 KiB

  1. 
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <title>onyx toolbar design</title>
  6. <link href="../source/css/onyx.css" rel="stylesheet" type="text/css" />
  7. <style>
  8. /*
  9. the 'inline' class attempts to setup a left-to-right container, with vertically centered children
  10. */
  11. .toolbar > *, .inline > * {
  12. display: inline-block;
  13. vertical-align: middle;
  14. }
  15. .toolbar, .inline {
  16. white-space: nowrap;
  17. /*
  18. We want to control line-height so that vertical-align: middle
  19. becomes true center. Otherwise, when line-height is in effect
  20. (i.e. if the actual height is less than line height),
  21. user agents pad the line unevenly.
  22. */
  23. line-height: 0;
  24. }
  25. .toolbar > *, .inline > * {
  26. /*
  27. Defeat line-height control above for children
  28. */
  29. line-height: normal;
  30. }
  31. .toolbar .inline, .inline .inline {
  32. /*
  33. Enforce line-height 0 for an inline child of an inline (FIXME: fiddly)
  34. */
  35. line-height: 0px;
  36. }
  37. /*
  38. toolbar is just an inline context with specific styling
  39. */
  40. .toolbar {
  41. padding: 8px;
  42. /**/
  43. box-sizing: border-box;
  44. -webkit-box-sizing: border-box;
  45. -moz-box-sizing: border-box;
  46. -ms-box-sizing: border-box;
  47. }
  48. /*
  49. It's useful to be able to abut toolbars in an inline context
  50. and not worry about varying heights.
  51. Generally icons are the largest elements in a toolbar, and will
  52. drive the height to this size.
  53. We can't set a min-size directly on the toolbar because it
  54. breaks centering (due to interation with line-height).
  55. For some scenarios a developer may want to override the height value.
  56. */
  57. .stent {
  58. visibility: none;
  59. width: 0px;
  60. height: 34px;
  61. }
  62. /* */
  63. .onyx .toolbar {
  64. padding: 8px;
  65. /**/
  66. border: 1px solid #3A3A3A;
  67. background: #4C4C4C url(../images/gradient.png) repeat-x 0 bottom;
  68. color: white;
  69. }
  70. /* */
  71. button {
  72. /* only needed for IE */
  73. line-height: normal !important;
  74. }
  75. .icon {
  76. width: 32px;
  77. height: 32px;
  78. background-image: url(menu-icon-bookmark.png);
  79. }
  80. /* */
  81. /*
  82. for display/debug only, not part of the design
  83. */
  84. .big {
  85. font-size: 42px;
  86. }
  87. .bord {
  88. border: 1px solid lightblue;
  89. }
  90. .bg {
  91. background-color: Red;
  92. }
  93. .bg .toolbar {
  94. background-color: white;
  95. }
  96. .lh0 {
  97. line-height: 0px;
  98. }
  99. .lhn {
  100. line-height: normal;
  101. }
  102. </style>
  103. </head>
  104. <body>
  105. <div class="onyx">
  106. <label>no content</label>
  107. <div class="toolbar"></div>
  108. <br />
  109. <label>text only content (padding is ignored due to line height control)</label>
  110. <div class="toolbar">Text</div>
  111. <br />
  112. <label>div content</label>
  113. <div class="toolbar">
  114. <div>Text in Div</div>
  115. </div>
  116. <br />
  117. <label>input content</label>
  118. <div class="toolbar">
  119. <input class="" />
  120. </div>
  121. <br />
  122. <label>input content</label>
  123. <div class="toolbar">
  124. <div class="icon"></div>
  125. </div>
  126. <br />
  127. <label>input content</label>
  128. <div class="toolbar">
  129. <img src="menu-icon-bookmark.png" height="32"/>
  130. </div>
  131. <br />
  132. <label>div content with min-height on toolbar (centering improper on tested user agents)</label>
  133. <div class="toolbar" style="min-height: 50px;">
  134. <div>Text in Div</div>
  135. </div>
  136. <br />
  137. <label>div content with stent</label>
  138. <div class="toolbar">
  139. <div class="stent"></div>
  140. <div>Text in Div</div>
  141. </div>
  142. <br />
  143. <label>stented toolbars abutting in inline context, as long as the stent is the largest item the bars align. There should be no red color visible above or below each toolbar.</label>
  144. <div class="inline" style="background-color: Red;">
  145. <div class="toolbar">
  146. <div class="stent"></div>
  147. <div>Text in Div</div>
  148. </div>
  149. <div class="toolbar">
  150. <div class="stent"></div>
  151. <input class="" />
  152. </div>
  153. <div class="toolbar">
  154. <div class="stent"></div>
  155. <div class="icon"></div>
  156. </div>
  157. <div class="toolbar">
  158. <div class="stent"></div>
  159. <img src="menu-icon-bookmark.png" height="32"/>
  160. </div>
  161. </div>
  162. </div>
  163. <hr />
  164. <div class="bord toolbar">
  165. <div class="bord">div</div>
  166. <input class="bord" />
  167. <div class="bord icon"></div>
  168. </div>
  169. <br />
  170. <div class="bord toolbar big">
  171. <div class="bord">div</div>
  172. <input class="bord" />
  173. <div class="bord icon"></div>
  174. </div>
  175. <br />
  176. <div class="bord toolbar big lh0">
  177. <div class="bord lhn">div</div>
  178. <input class="bord" />
  179. <div class="bord icon"></div>
  180. </div>
  181. <br />
  182. <div class="bord toolbar big lh0">
  183. <div class="bord lhn">div</div>
  184. <input class="bord" />
  185. </div>
  186. <br />
  187. <br />
  188. <div class="toolbar bord">
  189. <div class="bord">div</div>
  190. <input class="bord" />
  191. <div class="bord inline">
  192. <div class="bord">div</div>
  193. <input class="bord" />
  194. <div class="bord icon"></div>
  195. </div>
  196. <button>Button</button>
  197. <div class="bord icon"></div>
  198. <img class="bord" src="menu-icon-bookmark.png" height="32"/>
  199. </div>
  200. <br />
  201. <div class="toolbar bord big">
  202. <div class="bord">div</div>
  203. <div class="bord inline">
  204. <div class="bord">div</div>
  205. <input class="bord" />
  206. <div class="bord icon"></div>
  207. </div>
  208. <button>Button</button>
  209. <div class="bord icon"></div>
  210. <img class="bord"src="menu-icon-bookmark.png" height="32"/>
  211. </div>
  212. <br />
  213. <div class="toolbar big bord">
  214. <div class="bord">div</div>
  215. </div>
  216. <br />
  217. <div class="inline bord big bg">
  218. <div class="toolbar bord">
  219. <div class="bord">div</div>
  220. </div>
  221. <div class="toolbar bord">
  222. <div class="icon"></div>
  223. </div>
  224. <div class="toolbar bord">
  225. <div class="inline">
  226. <div class="icon"></div>
  227. </div>
  228. </div>
  229. <div class="toolbar bord">
  230. <div class="bord">div</div>
  231. <input class="bord" />
  232. <div class="inline">
  233. <div class="bord">div</div>
  234. <input class="bord" />
  235. <div class="icon"></div>
  236. </div>
  237. <button>Button</button>
  238. <div class="icon"></div>
  239. <img src="menu-icon-bookmark.png" height="32"/>
  240. </div>
  241. </div>
  242. </body>
  243. </html>