examples.less 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. // stylelint-disable selector-max-id, selector-no-qualifying-type
  2. // Grid examples
  3. //
  4. // Highlight the grid columns within the docs so folks can see their padding,
  5. // alignment, sizing, etc.
  6. .show-grid {
  7. margin-bottom: 15px;
  8. }
  9. .show-grid [class^="col-"] {
  10. padding-top: 10px;
  11. padding-bottom: 10px;
  12. background-color: #eee;
  13. background-color: rgba(86, 61, 124, .15);
  14. border: 1px solid #ddd;
  15. border: 1px solid rgba(86, 61, 124, .2);
  16. }
  17. // Examples
  18. //
  19. // Isolated sections of example content for each component or feature. Usually
  20. // followed by a code snippet.
  21. .bs-example {
  22. position: relative;
  23. padding: 45px 15px 15px;
  24. margin: 0 -15px 15px;
  25. border-color: #e5e5e5 #eee #eee;
  26. border-style: solid;
  27. border-width: 1px 0;
  28. box-shadow: inset 0 3px 6px rgba(0, 0, 0, .05);
  29. }
  30. // Echo out a label for the example
  31. .bs-example:after {
  32. position: absolute;
  33. top: 15px;
  34. left: 15px;
  35. font-size: 12px;
  36. font-weight: 700;
  37. color: #959595;
  38. text-transform: uppercase;
  39. letter-spacing: 1px;
  40. content: "Example";
  41. }
  42. .bs-example-padded-bottom {
  43. padding-bottom: 24px;
  44. }
  45. // Tweak display of the code snippets when following an example
  46. .bs-example + .highlight,
  47. .bs-example + .bs-clipboard + .highlight {
  48. margin: -15px -15px 15px;
  49. border-width: 0 0 1px;
  50. border-radius: 0;
  51. }
  52. // Make the examples and snippets not full-width
  53. @media (min-width: @screen-sm-min) {
  54. .bs-example {
  55. margin-right: 0;
  56. margin-left: 0;
  57. background-color: #fff;
  58. border-color: #ddd;
  59. border-width: 1px;
  60. border-radius: 4px 4px 0 0;
  61. box-shadow: none;
  62. }
  63. .bs-example + .highlight,
  64. .bs-example + .bs-clipboard + .highlight {
  65. margin-top: -16px;
  66. margin-right: 0;
  67. margin-left: 0;
  68. border-width: 1px;
  69. border-bottom-right-radius: 4px;
  70. border-bottom-left-radius: 4px;
  71. }
  72. .bs-example + .bs-clipboard .btn-clipboard {
  73. top: -15px; // due to padding .bs-example has
  74. border-top-right-radius: 0;
  75. }
  76. .bs-example-standalone {
  77. border-radius: 4px;
  78. }
  79. }
  80. // Undo width of container
  81. .bs-example .container {
  82. width: auto;
  83. }
  84. // Tweak content of examples for optimum awesome
  85. .bs-example > p:last-child,
  86. .bs-example > ul:last-child,
  87. .bs-example > ol:last-child,
  88. .bs-example > blockquote:last-child,
  89. .bs-example > .form-control:last-child,
  90. .bs-example > .table:last-child,
  91. .bs-example > .navbar:last-child,
  92. .bs-example > .jumbotron:last-child,
  93. .bs-example > .alert:last-child,
  94. .bs-example > .panel:last-child,
  95. .bs-example > .list-group:last-child,
  96. .bs-example > .well:last-child,
  97. .bs-example > .progress:last-child,
  98. .bs-example > .table-responsive:last-child > .table {
  99. margin-bottom: 0;
  100. }
  101. .bs-example > p > .close {
  102. float: none;
  103. }
  104. // Typography
  105. .bs-example-type .table .type-info {
  106. color: #767676;
  107. vertical-align: middle;
  108. }
  109. .bs-example-type .table td {
  110. padding: 15px 0;
  111. border-color: #eee;
  112. }
  113. .bs-example-type .table tr:first-child td {
  114. border-top: 0;
  115. }
  116. .bs-example-type h1,
  117. .bs-example-type h2,
  118. .bs-example-type h3,
  119. .bs-example-type h4,
  120. .bs-example-type h5,
  121. .bs-example-type h6 {
  122. margin: 0;
  123. }
  124. // Contextual background colors
  125. .bs-example-bg-classes p {
  126. padding: 15px;
  127. }
  128. // Images
  129. .bs-example > .img-circle,
  130. .bs-example > .img-rounded,
  131. .bs-example > .img-thumbnail {
  132. margin: 5px;
  133. }
  134. // Tables
  135. .bs-example > .table-responsive > .table {
  136. background-color: #fff;
  137. }
  138. // Buttons
  139. .bs-example > .btn,
  140. .bs-example > .btn-group {
  141. margin-top: 5px;
  142. margin-bottom: 5px;
  143. }
  144. .bs-example > .btn-toolbar + .btn-toolbar {
  145. margin-top: 10px;
  146. }
  147. // Forms
  148. .bs-example-control-sizing {
  149. select,
  150. input[type="text"] + input[type="text"] {
  151. margin-top: 10px;
  152. }
  153. }
  154. .bs-example-form .input-group {
  155. margin-bottom: 10px;
  156. }
  157. .bs-example > textarea.form-control {
  158. resize: vertical;
  159. }
  160. // List groups
  161. .bs-example > .list-group {
  162. max-width: 400px;
  163. }
  164. // Navbars
  165. .bs-example .navbar:last-child {
  166. margin-bottom: 0;
  167. }
  168. .bs-navbar-top-example,
  169. .bs-navbar-bottom-example {
  170. z-index: 1;
  171. padding: 0;
  172. overflow: hidden; // cut the drop shadows off
  173. }
  174. .bs-navbar-top-example .navbar-header,
  175. .bs-navbar-bottom-example .navbar-header {
  176. margin-left: 0;
  177. }
  178. .bs-navbar-top-example .navbar-fixed-top,
  179. .bs-navbar-bottom-example .navbar-fixed-bottom {
  180. position: relative;
  181. margin-right: 0;
  182. margin-left: 0;
  183. }
  184. .bs-navbar-top-example {
  185. padding-bottom: 45px;
  186. }
  187. .bs-navbar-top-example:after {
  188. top: auto;
  189. bottom: 15px;
  190. }
  191. .bs-navbar-top-example .navbar-fixed-top {
  192. top: -1px;
  193. }
  194. .bs-navbar-bottom-example {
  195. padding-top: 45px;
  196. }
  197. .bs-navbar-bottom-example .navbar-fixed-bottom {
  198. bottom: -1px;
  199. }
  200. .bs-navbar-bottom-example .navbar {
  201. margin-bottom: 0;
  202. }
  203. @media (min-width: 768px) {
  204. .bs-navbar-top-example .navbar-fixed-top,
  205. .bs-navbar-bottom-example .navbar-fixed-bottom {
  206. position: absolute;
  207. }
  208. }
  209. // Pagination
  210. .bs-example .pagination {
  211. margin-top: 10px;
  212. margin-bottom: 10px;
  213. }
  214. // Pager
  215. .bs-example > .pager {
  216. margin-top: 0;
  217. }
  218. // Example modals
  219. .bs-example-modal {
  220. background-color: #f5f5f5;
  221. }
  222. .bs-example-modal .modal {
  223. position: relative;
  224. top: auto;
  225. right: auto;
  226. bottom: auto;
  227. left: auto;
  228. z-index: 1;
  229. display: block;
  230. }
  231. .bs-example-modal .modal-dialog {
  232. left: auto;
  233. margin-right: auto;
  234. margin-left: auto;
  235. }
  236. // Example dropdowns
  237. .bs-example > .dropdown > .dropdown-toggle {
  238. float: left;
  239. }
  240. .bs-example > .dropdown > .dropdown-menu {
  241. position: static;
  242. display: block;
  243. margin-bottom: 5px;
  244. clear: left;
  245. }
  246. // Example tabbable tabs
  247. .bs-example-tabs .nav-tabs {
  248. margin-bottom: 15px;
  249. }
  250. // Tooltips
  251. .bs-example-tooltips {
  252. text-align: center;
  253. }
  254. .bs-example-tooltips > .btn {
  255. margin-top: 5px;
  256. margin-bottom: 5px;
  257. }
  258. .bs-example-tooltip .tooltip {
  259. position: relative;
  260. display: inline-block;
  261. margin: 10px 20px;
  262. opacity: 1;
  263. }
  264. // Popovers
  265. .bs-example-popover {
  266. padding-bottom: 24px;
  267. background-color: #f9f9f9;
  268. }
  269. .bs-example-popover .popover {
  270. position: relative;
  271. display: block;
  272. float: left;
  273. width: 260px;
  274. margin: 20px;
  275. }
  276. // Scrollspy demo on fixed height div
  277. .scrollspy-example {
  278. position: relative;
  279. height: 200px;
  280. margin-top: 10px;
  281. overflow: auto;
  282. }
  283. .bs-example > .nav-pills-stacked-example {
  284. max-width: 300px;
  285. }
  286. // Simple collapse example
  287. #collapseExample .well {
  288. margin-bottom: 0;
  289. }
  290. // Pseudo :focus state for showing how it looks in the docs
  291. #focusedInput {
  292. border-color: rgb(204, 204, 204); // Restate unfocused value to make CSSLint happy that there's a pre-CSS3 fallback
  293. border-color: rgba(82, 168, 236, .8);
  294. outline: 0;
  295. outline: thin dotted \9; // IE6-9
  296. box-shadow: 0 0 8px rgba(82, 168, 236, .6);
  297. }