toolbar.css 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. /*
  2. Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. For licensing, see LICENSE.md or http://ckeditor.com/license
  4. */
  5. /*
  6. toolbar.css (part of editor.css)
  7. ==================================
  8. This files styles the CKEditor toolbar and its buttons. For toolbar combo
  9. styles, check richcombo.css.
  10. The toolbar is rendered as a big container (called toolbox), which contains
  11. smaller "toolbars". Each toolbar represents a group of items that cannot be
  12. separated. The following is the visual representation of the toolbox.
  13. +-- .cke_toolbox ----------------------------------------------------------+
  14. | +-- .cke_toolbar --+ +-- .cke_toolbar --+ ... +-- .cke_toolbar_break --+ |
  15. | | | | | | | |
  16. | +------------------+ +------------------+ +------------------------+ |
  17. | +-- .cke_toolbar --+ +-- .cke_toolbar --+ ... |
  18. | | | | | |
  19. | +------------------+ +------------------+ |
  20. +--------------------------------------------------------------------------+
  21. The following instead is the visual representation of a single toolbar:
  22. +-- .cke_toolbar ----------------------------------------------------------------+
  23. | +-- .cke_toolbar_start --+ +-- .cke_toolgroup (*) --+ +-- .cke_toolbar_end --+ |
  24. | | | | | | | |
  25. | +------------------------+ +------------------------+ +----------------------+ |
  26. +--------------------------------------------------------------------------------+
  27. (*) .cke_toolgroup is available only when the toolbar items can be grouped
  28. (buttons). If the items can't be group (combos), this box is not available
  29. and the items are rendered straight in that place.
  30. This file also styles toolbar buttons, which are rendered inside the above
  31. .cke_toolgroup containers. This is the visual representation of a button:
  32. +-- .cke_button -------------------------------------+
  33. | +-- .cke_button_icon --+ +-- .cke_button_label --+ |
  34. | | | | | |
  35. | +----------------------+ +-----------------------+ |
  36. +----------------------------------------------------+
  37. Special outer level classes used in this file:
  38. .cke_hc: Available when the editor is rendered on "High Contrast".
  39. .cke_rtl: Available when the editor UI is on RTL.
  40. */
  41. /* The box that holds each toolbar. */
  42. .cke_toolbar
  43. {
  44. float: left;
  45. }
  46. .cke_rtl .cke_toolbar
  47. {
  48. float: right;
  49. }
  50. /* The box that holds buttons. */
  51. .cke_toolgroup
  52. {
  53. float: left;
  54. margin: 0 6px 5px 0;
  55. border: 1px solid #a6a6a6;
  56. border-bottom-color: #979797;
  57. border-radius: 3px;
  58. box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 0 2px rgba(255,255,255,.15) inset, 0 1px 0 rgba(255,255,255,.15) inset;
  59. background: #e4e4e4;
  60. background-image: linear-gradient(to bottom, #ffffff, #e4e4e4);
  61. filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#ffffff', endColorstr='#e4e4e4');
  62. }
  63. .cke_hc .cke_toolgroup
  64. {
  65. border: 0;
  66. margin-right: 10px;
  67. margin-bottom: 10px;
  68. }
  69. .cke_rtl .cke_toolgroup
  70. {
  71. float: right;
  72. margin-left: 6px;
  73. margin-right: 0;
  74. }
  75. /* A toolbar button . */
  76. a.cke_button
  77. {
  78. display: inline-block;
  79. height: 18px;
  80. padding: 4px 6px;
  81. outline: none;
  82. cursor: default;
  83. float: left;
  84. border: 0;
  85. }
  86. .cke_ltr .cke_button:last-child,
  87. .cke_rtl .cke_button:first-child
  88. {
  89. /* Don't distort parent's rounded border. */
  90. border-radius: 0 2px 2px 0;
  91. }
  92. .cke_ltr .cke_button:first-child,
  93. .cke_rtl .cke_button:last-child
  94. {
  95. /* Don't distort parent's rounded border. */
  96. border-radius: 2px 0 0 2px;
  97. }
  98. .cke_rtl .cke_button
  99. {
  100. float: right;
  101. }
  102. .cke_hc .cke_button
  103. {
  104. border: 1px solid black;
  105. /* Compensate the added border */
  106. padding: 3px 5px;
  107. margin: -2px 4px 0 -2px;
  108. }
  109. /* This class is applied to the button when it is "active" (pushed).
  110. This style indicates that the feature associated with the button is active
  111. i.e. currently writing in bold or when spell checking is enabled. */
  112. a.cke_button_on
  113. {
  114. box-shadow: 0 1px 5px rgba(0,0,0,.6) inset, 0 1px 0 rgba(0,0,0,.2);
  115. background: #b5b5b5;
  116. background-image: linear-gradient(to bottom, #aaa, #cacaca);
  117. filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#aaaaaa', endColorstr='#cacaca');
  118. }
  119. .cke_hc .cke_button_on,
  120. .cke_hc a.cke_button_off:hover,
  121. .cke_hc a.cke_button_off:focus,
  122. .cke_hc a.cke_button_off:active,
  123. .cke_hc a.cke_button_disabled:hover,
  124. .cke_hc a.cke_button_disabled:focus,
  125. .cke_hc a.cke_button_disabled:active
  126. {
  127. border-width: 3px;
  128. /* Compensate the border change */
  129. padding: 1px 3px;
  130. }
  131. /* This class is applied to the button when the feature associated with the
  132. button cannot be used (grayed-out).
  133. i.e. paste button remains disabled when there is nothing in the clipboard to
  134. be pasted. */
  135. .cke_button_disabled .cke_button_icon
  136. {
  137. opacity: 0.3;
  138. }
  139. .cke_hc .cke_button_disabled
  140. {
  141. opacity: 0.5;
  142. }
  143. a.cke_button_on:hover,
  144. a.cke_button_on:focus,
  145. a.cke_button_on:active
  146. {
  147. box-shadow: 0 1px 6px rgba(0,0,0,.7) inset, 0 1px 0 rgba(0,0,0,.2);
  148. }
  149. a.cke_button_off:hover,
  150. a.cke_button_off:focus,
  151. a.cke_button_off:active,
  152. a.cke_button_disabled:hover,
  153. a.cke_button_disabled:focus,
  154. a.cke_button_disabled:active
  155. {
  156. box-shadow: 0 0 1px rgba(0,0,0,.3) inset;
  157. background: #ccc;
  158. background-image: linear-gradient(to bottom, #f2f2f2, #ccc);
  159. filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#f2f2f2', endColorstr='#cccccc');
  160. }
  161. /* The icon which is a visual representation of the button. */
  162. .cke_button_icon
  163. {
  164. cursor: inherit;
  165. background-repeat: no-repeat;
  166. margin-top: 1px;
  167. width: 16px;
  168. height: 16px;
  169. float: left;
  170. display: inline-block;
  171. }
  172. .cke_rtl .cke_button_icon
  173. {
  174. float: right;
  175. }
  176. .cke_hc .cke_button_icon
  177. {
  178. display: none;
  179. }
  180. /* The label of the button that stores the name of the feature. By default,
  181. labels are invisible. They can be revealed on demand though. */
  182. .cke_button_label
  183. {
  184. display: none;
  185. padding-left: 3px;
  186. margin-top: 1px;
  187. line-height: 17px;
  188. vertical-align: middle;
  189. float: left;
  190. cursor: default;
  191. color: #474747;
  192. text-shadow: 0 1px 0 rgba(255,255,255,.5);
  193. }
  194. .cke_rtl .cke_button_label
  195. {
  196. padding-right: 3px;
  197. padding-left: 0;
  198. float: right;
  199. }
  200. .cke_hc .cke_button_label
  201. {
  202. padding: 0;
  203. display: inline-block;
  204. font-size: 12px;
  205. }
  206. /* The small arrow available on buttons that can be expanded
  207. (e.g. the color buttons). */
  208. .cke_button_arrow
  209. {
  210. /* Arrow in CSS */
  211. display: inline-block;
  212. margin: 8px 0 0 1px;
  213. width: 0;
  214. height: 0;
  215. cursor: default;
  216. vertical-align: top;
  217. border-left: 3px solid transparent;
  218. border-right: 3px solid transparent;
  219. border-top: 3px solid #474747;
  220. }
  221. .cke_rtl .cke_button_arrow
  222. {
  223. margin-right: 5px;
  224. margin-left: 0;
  225. }
  226. .cke_hc .cke_button_arrow
  227. {
  228. font-size: 10px;
  229. margin: 3px -2px 0 3px;
  230. width: auto;
  231. border: 0;
  232. }
  233. /* The vertical separator which is used within a single toolbar to split
  234. buttons into sub-groups. */
  235. .cke_toolbar_separator
  236. {
  237. float: left;
  238. background-color: #c0c0c0;
  239. background-color: rgba(0,0,0,.2);
  240. margin: 5px 2px 0;
  241. height: 18px;
  242. width: 1px;
  243. box-shadow: 1px 0 1px rgba(255,255,255,.5);
  244. }
  245. .cke_rtl .cke_toolbar_separator
  246. {
  247. float: right;
  248. box-shadow: -1px 0 1px rgba(255,255,255,.1);
  249. }
  250. .cke_hc .cke_toolbar_separator
  251. {
  252. width: 0;
  253. border-left: 1px solid;
  254. margin: 1px 5px 0 0px;
  255. }
  256. /* The dummy element that breaks toolbars.
  257. Once it is placed, the very next toolbar is moved to the new row. */
  258. .cke_toolbar_break
  259. {
  260. display: block;
  261. clear: left;
  262. }
  263. .cke_rtl .cke_toolbar_break
  264. {
  265. clear: right;
  266. }
  267. /* The button, which when clicked hides (collapses) all the toolbars. */
  268. a.cke_toolbox_collapser
  269. {
  270. width: 12px;
  271. height: 11px;
  272. float: right;
  273. margin: 11px 0 0;
  274. font-size: 0;
  275. cursor: default;
  276. text-align: center;
  277. border: 1px solid #a6a6a6;
  278. border-bottom-color: #979797;
  279. border-radius: 3px;
  280. box-shadow: 0 1px 0 rgba(255,255,255,.5), 0 0 2px rgba(255,255,255,.15) inset, 0 1px 0 rgba(255,255,255,.15) inset;
  281. background: #e4e4e4;
  282. background-image: linear-gradient(to bottom, #ffffff, #e4e4e4);
  283. filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#ffffff', endColorstr='#e4e4e4');
  284. }
  285. .cke_toolbox_collapser:hover
  286. {
  287. background: #ccc;
  288. background-image: linear-gradient(to bottom, #f2f2f2, #ccc);
  289. filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#f2f2f2', endColorstr='#cccccc');
  290. }
  291. .cke_toolbox_collapser.cke_toolbox_collapser_min
  292. {
  293. margin: 0 2px 4px;
  294. }
  295. .cke_rtl .cke_toolbox_collapser
  296. {
  297. float: left;
  298. }
  299. /* The CSS arrow, which belongs to the toolbar collapser. */
  300. .cke_toolbox_collapser .cke_arrow
  301. {
  302. display: inline-block;
  303. /* Pure CSS Arrow */
  304. height: 0;
  305. width: 0;
  306. font-size: 0;
  307. margin-top: 1px;
  308. border-left: 3px solid transparent;
  309. border-right: 3px solid transparent;
  310. border-bottom: 3px solid #474747;
  311. border-top: 3px solid transparent;
  312. }
  313. .cke_toolbox_collapser.cke_toolbox_collapser_min .cke_arrow
  314. {
  315. margin-top: 4px;
  316. border-bottom-color: transparent;
  317. border-top-color: #474747;
  318. }
  319. .cke_hc .cke_toolbox_collapser .cke_arrow
  320. {
  321. font-size: 8px;
  322. width: auto;
  323. border: 0;
  324. margin-top: 0;
  325. margin-right: 2px;
  326. }