_examples.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // Examples
  2. //
  3. // Styles for the Select2 examples, largely copied
  4. // from Bootstrap's docs styles.
  5. //
  6. // @see https://github.com/twbs/bootstrap/blob/master/docs/assets/css/src/docs.css#L533
  7. .s2-example {
  8. position: relative;
  9. padding: 45px 15px 15px;
  10. margin: 0 -15px 15px;
  11. background-color: #fafafa;
  12. box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.05);
  13. border-color: #e5e5e5 #eee #eee;
  14. border-style: solid;
  15. border-width: 1px 0;
  16. &:after {
  17. content: "Example";
  18. position: absolute;
  19. top: 15px;
  20. left: 15px;
  21. font-size: 12px;
  22. font-weight: bold;
  23. color: #bbb;
  24. text-transform: uppercase;
  25. letter-spacing: 1px;
  26. }
  27. @media (min-width: 768px) {
  28. margin-left: 0;
  29. margin-right: 0;
  30. background-color: #fff;
  31. border-width: 1px;
  32. border-color: #eee;
  33. border-radius: 4px 4px 0 0;
  34. box-shadow: none;
  35. }
  36. }
  37. // styles for the event log in the "DOM events" section of the docs
  38. .s2-event-log {
  39. background: #002451;
  40. color: white;
  41. font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
  42. margin: 0 -15px 15px;
  43. padding: 45px 15px 15px;
  44. position: relative;
  45. &:after {
  46. content: "Event Log";
  47. position: absolute;
  48. top: 15px;
  49. left: 15px;
  50. font-size: 12px;
  51. font-weight: bold;
  52. color: #BBB;
  53. text-transform: uppercase;
  54. letter-spacing: 1px;
  55. }
  56. @media (min-width: 768px) {
  57. margin-left: 0;
  58. margin-right: 0;
  59. margin-top: -15px;
  60. border-width: 1px;
  61. border-color: #eee;
  62. box-shadow: none;
  63. }
  64. }
  65. .s2-example + pre,
  66. .s2-example + figure,
  67. .s2-event-log + pre {
  68. margin: -15px -15px 15px;
  69. border-radius: 0;
  70. border-width: 0 0 1px;
  71. @media (min-width: 768px) {
  72. margin-top: -16px;
  73. margin-left: 0;
  74. margin-right: 0;
  75. border-width: 1px;
  76. border-bottom-left-radius: 4px;
  77. border-bottom-right-radius: 4px;
  78. }
  79. }
  80. .s2-example + .s2-event-log {
  81. margin-top: -15px;
  82. }