cheatsheet.rtl.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. body {
  2. scroll-behavior: smooth;
  3. }
  4. /**
  5. * Bootstrap "Journal code" icon
  6. * @link https://icons.getbootstrap.com/icons/journal-code/
  7. */
  8. .bd-heading a::before {
  9. display: inline-block;
  10. width: 1em;
  11. height: 1em;
  12. margin-left: .25rem;
  13. content: "";
  14. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%25230d6efd' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1H2a2 2 0 0 1 2-2z'/%3E%3Cpath d='M2 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2z'/%3E%3Cpath fill-rule='evenodd' d='M8.646 5.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 8 8.646 6.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 8l1.647-1.646a.5.5 0 0 0 0-.708z'/%3E%3C/svg%3E");
  15. background-size: 1em;
  16. }
  17. /* stylelint-disable-next-line selector-max-universal */
  18. .bd-heading + div > * + * {
  19. margin-top: 3rem;
  20. }
  21. /* Table of contents */
  22. .bd-aside a {
  23. padding: .1875rem .5rem;
  24. margin-top: .125rem;
  25. margin-right: .3125rem;
  26. color: rgba(0, 0, 0, .65);
  27. text-decoration: none;
  28. }
  29. .bd-aside a:hover,
  30. .bd-aside a:focus {
  31. color: rgba(0, 0, 0, .85);
  32. background-color: rgba(121, 82, 179, .1);
  33. }
  34. .bd-aside .active {
  35. font-weight: 600;
  36. color: rgba(0, 0, 0, .85);
  37. }
  38. .bd-aside .btn {
  39. padding: .25rem .5rem;
  40. font-weight: 600;
  41. color: rgba(0, 0, 0, .65);
  42. border: 0;
  43. }
  44. .bd-aside .btn:hover,
  45. .bd-aside .btn:focus {
  46. color: rgba(0, 0, 0, .85);
  47. background-color: rgba(121, 82, 179, .1);
  48. }
  49. .bd-aside .btn:focus {
  50. box-shadow: 0 0 0 1px rgba(121, 82, 179, .7);
  51. }
  52. .bd-aside .btn::before {
  53. width: 1.25em;
  54. line-height: 0;
  55. content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
  56. transition: transform .35s ease;
  57. transform: rotate(180deg) translateX(-2px);
  58. transform-origin: .5em 50%;
  59. }
  60. .bd-aside .btn[aria-expanded="true"]::before {
  61. transform: rotate(90deg);
  62. }
  63. /* Examples */
  64. .scrollspy-example {
  65. position: relative;
  66. height: 200px;
  67. margin-top: .5rem;
  68. overflow: auto;
  69. }
  70. [id="modal"] .bd-example .btn,
  71. [id="buttons"] .bd-example .btn,
  72. [id="tooltips"] .bd-example .btn,
  73. [id="popovers"] .bd-example .btn,
  74. [id="dropdowns"] .bd-example .btn-group,
  75. [id="dropdowns"] .bd-example .dropdown,
  76. [id="dropdowns"] .bd-example .dropup,
  77. [id="dropdowns"] .bd-example .dropend,
  78. [id="dropdowns"] .bd-example .dropstart {
  79. margin: 0 0 1rem 1rem;
  80. }
  81. /* Layout */
  82. @media (min-width: 1200px) {
  83. body {
  84. display: grid;
  85. gap: 1rem;
  86. grid-template-columns: 1fr 4fr 1fr;
  87. grid-template-rows: auto;
  88. }
  89. .bd-header {
  90. position: fixed;
  91. top: 0;
  92. right: 0;
  93. left: 0;
  94. z-index: 1030;
  95. grid-column: 1 / span 3;
  96. }
  97. .bd-aside,
  98. .bd-cheatsheet {
  99. padding-top: 4rem;
  100. }
  101. /**
  102. * 1. Too bad only Firefox supports subgrids ATM
  103. */
  104. .bd-cheatsheet,
  105. .bd-cheatsheet section,
  106. .bd-cheatsheet article {
  107. display: inherit; /* 1 */
  108. gap: inherit; /* 1 */
  109. grid-template-columns: 1fr 4fr;
  110. grid-column: 1 / span 2;
  111. grid-template-rows: auto;
  112. }
  113. .bd-aside {
  114. grid-area: 1 / 3;
  115. scroll-margin-top: 4rem;
  116. }
  117. .bd-cheatsheet section,
  118. .bd-cheatsheet section > h2 {
  119. top: 2rem;
  120. scroll-margin-top: 2rem;
  121. }
  122. .bd-cheatsheet section > h2::before {
  123. position: absolute;
  124. top: 0;
  125. right: 0;
  126. bottom: -2rem;
  127. left: 0;
  128. z-index: -1;
  129. content: "";
  130. background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1) calc(100% - 3rem), rgba(255, 255, 255, .01));
  131. }
  132. .bd-cheatsheet article,
  133. .bd-cheatsheet .bd-heading {
  134. top: 8rem;
  135. scroll-margin-top: 8rem;
  136. }
  137. .bd-cheatsheet .bd-heading {
  138. z-index: 1;
  139. }
  140. }