No Description
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.

_component-examples.scss 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. // stylelint-disable no-duplicate-selectors, selector-no-qualifying-type
  2. //
  3. // Grid examples
  4. //
  5. .ct-example-row {
  6. .row {
  7. > .col,
  8. > [class^="col-"] {
  9. span {
  10. display: block;
  11. padding: .75rem;
  12. color: rgb(57, 63, 73);
  13. background-color: rgb(255, 255, 255);
  14. box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 16px;
  15. font-size: $font-size-sm;
  16. border-radius: .25rem;
  17. margin: 1rem 0;
  18. }
  19. }
  20. }
  21. .no-gutters {
  22. > .col,
  23. > [class^="col-"] {
  24. span {
  25. border-radius: 0;
  26. }
  27. }
  28. }
  29. .flex-items-top,
  30. .flex-items-middle,
  31. .flex-items-bottom {
  32. min-height: 6rem;
  33. background-color: rgba(255, 0, 0, .1);
  34. }
  35. }
  36. .ct-example-row-flex-cols .row {
  37. min-height: 10rem;
  38. background-color: rgba(255, 0, 0, .1);
  39. & + .row {
  40. margin-top: 1rem;
  41. }
  42. }
  43. .ct-highlight {
  44. background-color: rgba($ct-primary, .15);
  45. border: 1px solid rgba($ct-primary, .15);
  46. }
  47. // Grid mixins
  48. .example-container {
  49. width: 800px;
  50. @include make-container();
  51. }
  52. .example-row {
  53. @include make-row();
  54. }
  55. .example-content-main {
  56. @include make-col-ready();
  57. @include media-breakpoint-up(sm) {
  58. @include make-col(6);
  59. }
  60. @include media-breakpoint-up(lg) {
  61. @include make-col(8);
  62. }
  63. }
  64. .example-content-secondary {
  65. @include make-col-ready();
  66. @include media-breakpoint-up(sm) {
  67. @include make-col(6);
  68. }
  69. @include media-breakpoint-up(lg) {
  70. @include make-col(4);
  71. }
  72. }
  73. //
  74. // Container illustrations
  75. //
  76. .ct-example-container {
  77. min-width: 16rem;
  78. max-width: 25rem;
  79. margin-right: auto;
  80. margin-left: auto;
  81. }
  82. .ct-example-container-header {
  83. height: 3rem;
  84. margin-bottom: .5rem;
  85. background-color: lighten($blue, 50%);
  86. border-radius: .25rem;
  87. }
  88. .ct-example-container-sidebar {
  89. float: right;
  90. width: 4rem;
  91. height: 8rem;
  92. background-color: lighten($blue, 25%);
  93. border-radius: .25rem;
  94. }
  95. .ct-example-container-body {
  96. height: 8rem;
  97. margin-right: 4.5rem;
  98. background-color: lighten($ct-primary, 25%);
  99. border-radius: .25rem;
  100. }
  101. .ct-example-container-fluid {
  102. max-width: none;
  103. }
  104. //
  105. // Docs examples
  106. //
  107. .ct-example {
  108. position: relative;
  109. margin: 1rem (-$grid-gutter-width / 2) 0;
  110. @include clearfix();
  111. @include media-breakpoint-up(sm) {
  112. margin-right: 0;
  113. margin-left: 0;
  114. }
  115. + .highlight,
  116. + .clipboard + .highlight {
  117. margin-top: 0;
  118. }
  119. + p {
  120. margin-top: 2rem;
  121. }
  122. .pos-f-t {
  123. position: relative;
  124. margin: -1rem;
  125. @include media-breakpoint-up(sm) {
  126. margin: -1.5rem;
  127. }
  128. }
  129. .custom-file-input:lang(es) ~ .custom-file-label::after {
  130. content: "Elegir";
  131. }
  132. > .form-control {
  133. + .form-control {
  134. margin-top: .5rem;
  135. }
  136. }
  137. > .nav + .nav,
  138. > .alert + .alert,
  139. > .navbar + .navbar,
  140. > .progress + .progress,
  141. > .progress + .btn,
  142. .badge,
  143. .btn {
  144. margin-top: .5rem;
  145. margin-bottom: .5rem;
  146. }
  147. .btn-group {
  148. margin-top: .5rem;
  149. margin-bottom: .5rem;
  150. .btn {
  151. margin: 0;
  152. }
  153. }
  154. .alert {
  155. margin: 0;
  156. + .alert {
  157. margin-top: 1.25rem;
  158. }
  159. }
  160. .badge {
  161. margin-right: .5rem;
  162. }
  163. > .dropdown-menu:first-child {
  164. position: static;
  165. display: block;
  166. }
  167. > .form-group:last-child {
  168. margin-bottom: 0;
  169. }
  170. > .close {
  171. float: none;
  172. }
  173. }
  174. // Typography
  175. .ct-example-type {
  176. .table {
  177. .type-info {
  178. color: #999;
  179. vertical-align: middle;
  180. }
  181. td {
  182. padding: 1rem 0;
  183. border-color: #eee;
  184. }
  185. tr:first-child td {
  186. border-top: 0;
  187. }
  188. }
  189. h1,
  190. h2,
  191. h3,
  192. h4,
  193. h5,
  194. h6 {
  195. margin-top: 0;
  196. margin-bottom: 0;
  197. }
  198. }
  199. // Contextual background colors
  200. .ct-example-bg-classes p {
  201. padding: 1rem;
  202. }
  203. // Images
  204. .ct-example > img {
  205. + img {
  206. margin-left: .5rem;
  207. }
  208. }
  209. // Buttons
  210. .ct-example {
  211. > .btn-group {
  212. margin-top: .25rem;
  213. margin-bottom: .25rem;
  214. }
  215. > .btn-toolbar + .btn-toolbar {
  216. margin-top: .5rem;
  217. }
  218. }
  219. // Forms
  220. .ct-example-control-sizing select,
  221. .ct-example-control-sizing input[type="text"] + input[type="text"] {
  222. margin-top: .5rem;
  223. }
  224. .ct-example-form .input-group {
  225. margin-bottom: .5rem;
  226. }
  227. .ct-example > textarea.form-control {
  228. resize: vertical;
  229. }
  230. // List groups
  231. .ct-example > .list-group {
  232. max-width: 400px;
  233. }
  234. // Navbars
  235. .ct-example {
  236. .fixed-top,
  237. .sticky-top {
  238. position: static;
  239. margin: -1rem -1rem 1rem;
  240. }
  241. .fixed-bottom {
  242. position: static;
  243. margin: 1rem -1rem -1rem;
  244. }
  245. @include media-breakpoint-up(sm) {
  246. .fixed-top,
  247. .sticky-top {
  248. margin: -1.5rem -1.5rem 1rem;
  249. }
  250. .fixed-bottom {
  251. margin: 1rem -1.5rem -1.5rem;
  252. }
  253. }
  254. }
  255. // Pagination
  256. .ct-example .pagination {
  257. margin-top: .5rem;
  258. margin-bottom: .5rem;
  259. }
  260. // Example modals
  261. .modal {
  262. z-index: 1072;
  263. .tooltip,
  264. .popover {
  265. z-index: 1073;
  266. }
  267. }
  268. .modal-backdrop {
  269. z-index: 1071;
  270. }
  271. .ct-example-modal {
  272. background-color: #fafafa;
  273. .modal {
  274. position: relative;
  275. top: auto;
  276. right: auto;
  277. bottom: auto;
  278. left: auto;
  279. z-index: 1;
  280. display: block;
  281. }
  282. .modal-dialog {
  283. left: auto;
  284. margin-right: auto;
  285. margin-left: auto;
  286. }
  287. }
  288. // Example tabbable tabs
  289. .ct-example-tabs .nav-tabs {
  290. margin-bottom: 1rem;
  291. }
  292. // Popovers
  293. .ct-example-popover-static {
  294. padding-bottom: 1.5rem;
  295. background-color: #f9f9f9;
  296. .popover {
  297. position: relative;
  298. display: block;
  299. float: left;
  300. width: 260px;
  301. margin: 1.25rem;
  302. }
  303. }
  304. // Tooltips
  305. .tooltip-demo a {
  306. white-space: nowrap;
  307. }
  308. .ct-example-tooltip-static .tooltip {
  309. position: relative;
  310. display: inline-block;
  311. margin: 10px 20px;
  312. opacity: 1;
  313. }
  314. // Scrollspy demo on fixed height div
  315. .scrollspy-example {
  316. position: relative;
  317. height: 200px;
  318. margin-top: .5rem;
  319. overflow: auto;
  320. }
  321. .scrollspy-example-2 {
  322. position: relative;
  323. height: 350px;
  324. overflow: auto;
  325. }
  326. .ct-example-border-utils {
  327. [class^="border"] {
  328. display: inline-block;
  329. width: 5rem;
  330. height: 5rem;
  331. margin: .25rem;
  332. background-color: #f5f5f5;
  333. }
  334. }
  335. .ct-example-border-utils-0 {
  336. [class^="border"] {
  337. border: 1px solid $border-color;
  338. }
  339. }
  340. //
  341. // Code snippets
  342. //
  343. .highlight {
  344. padding: 0;
  345. margin-top: 1rem;
  346. //margin-bottom: 3rem;
  347. //background-color: $gray-100;
  348. -ms-overflow-style: -ms-autohiding-scrollbar;
  349. @include media-breakpoint-up(sm) {
  350. padding: 0;
  351. }
  352. }
  353. .ct-content .highlight {
  354. margin-right: (-$grid-gutter-width / 2);
  355. margin-left: (-$grid-gutter-width / 2);
  356. @include media-breakpoint-up(sm) {
  357. margin-right: 0;
  358. margin-left: 0;
  359. }
  360. }
  361. //
  362. // Component-Code tabs
  363. //
  364. .ct-example {
  365. margin-bottom: 2rem;
  366. padding-bottom: 2rem;
  367. border-bottom: 1px solid $gray-200;
  368. .tab-content {
  369. .tab-example-result {
  370. background-color: #f5f7f9;
  371. border: 1px solid #e6ecf1;
  372. padding: 1.25rem;
  373. border-radius: .25rem;
  374. }
  375. }
  376. .nav-tabs-code {
  377. margin-bottom: .375rem;
  378. .nav-link {
  379. font-size: .875rem;
  380. &:active,
  381. &.active {
  382. color: $ct-primary;
  383. }
  384. }
  385. }
  386. }
  387. // Icon examples
  388. .icon-examples {
  389. margin-top: 1rem;
  390. }
  391. .btn-icon-clipboard {
  392. margin: 0px;
  393. padding: 24px;
  394. font-size: 16px;
  395. font-weight: 400;
  396. line-height: 1.25;
  397. color: rgb(57, 63, 73);
  398. background-color: rgb(248, 249, 250);
  399. border-radius: 4px;
  400. border: 0px none;
  401. text-align: left;
  402. font-family: inherit;
  403. display: inline-block;
  404. vertical-align: middle;
  405. text-decoration: none;
  406. -moz-appearance: none;
  407. cursor: pointer;
  408. width: 100%;
  409. margin: .5rem 0;
  410. &:hover {
  411. background-color: rgb(255, 255, 255);
  412. box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 4px 16px;
  413. }
  414. > div {
  415. align-items: center;
  416. display: flex;
  417. }
  418. i {
  419. box-sizing: content-box;
  420. color: rgb(57, 63, 73);
  421. vertical-align: middle;
  422. font-size: 1.5rem;
  423. }
  424. span {
  425. display: inline-block;
  426. font-size: .875rem;
  427. line-height: 1.5;
  428. color: rgb(57, 63, 73);
  429. margin-left: 16px;
  430. overflow: hidden;
  431. white-space: nowrap;
  432. text-overflow: ellipsis;
  433. vertical-align: middle;
  434. }
  435. }