_barefoot.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // Barefoot footnotes
  2. //-------------------------------
  3. .footnote-container {
  4. display: inline-block;
  5. position: relative;
  6. text-indent: 0;
  7. }
  8. .footnote-backdrop {
  9. cursor: pointer;
  10. }
  11. .footnote-button {
  12. // background: rgba(110, 110, 110, .2);
  13. background: var(--code-bg-color);
  14. box-shadow: 0 1px 1px var(--shadow-color);
  15. border: 0;
  16. border-radius: .475em;
  17. cursor: pointer;
  18. display: inline-block;
  19. font-size: 1.5rem;
  20. height: .95em;
  21. line-height: 0;
  22. margin: .2em .2em 0 .2em;
  23. padding: .35em;
  24. position: relative;
  25. top: -.2em;
  26. transition-duration: .25s;
  27. transition-property: background;
  28. /* vertical-align: super; */
  29. vertical-align: middle;
  30. width: 1.5em;
  31. z-index: 5;
  32. &:after {
  33. font-family: 'icomoon';
  34. content: "\e5d3";
  35. /* numbered footnotes
  36. content: attr(data-fn-number); */
  37. // color: rgba(110, 110, 110, .5);
  38. color: var(--text-color-light);
  39. display: block;
  40. font-size: 1em;
  41. font-weight: bold;
  42. left: 50%;
  43. position: absolute;
  44. top: 50%;
  45. transform: translate(-50%, -50%);
  46. transition: color .25s ease;
  47. }
  48. /* fix focus */
  49. &:focus{
  50. outline: none
  51. }
  52. &:hover {
  53. // background: rgba(110, 110, 110, .5);
  54. background: var(--table-header-color);
  55. outline: none;
  56. &:after {
  57. color: var(--text-color);
  58. outline: none;
  59. }
  60. }
  61. &.is-active {
  62. // background: rgba(110, 110, 110, 1);
  63. background: var(--table-border-color);
  64. transition-delay: .1s;
  65. &:after {
  66. color: var(--text-color);
  67. }
  68. }
  69. }
  70. .bf-footnote {
  71. background: var(--code-bg-color);
  72. // border: 1px solid var(--code-border);
  73. box-shadow: 0 1px 2px var(--shadow-color);
  74. /* border-radius: .25em; */
  75. left: 0;
  76. margin: $magic 0;
  77. max-width: 90vw;
  78. opacity: 0;
  79. position: absolute;
  80. top: 0;
  81. transform-origin: 50% 0;
  82. transition-duration: .25s;
  83. transition-property: opacity;
  84. transition-timing-function: ease;
  85. z-index: 10;
  86. &.footnote-is-active {
  87. opacity: 1;
  88. }
  89. &.footnote-is-top {
  90. bottom: 0;
  91. top: auto;
  92. }
  93. }
  94. .footnote-wrapper {
  95. background: inherit;
  96. border-radius: .25em;
  97. margin: 0;
  98. max-width: 100%;
  99. overflow: hidden;
  100. position: relative;
  101. width: 22em;
  102. z-index: 14;
  103. /* nie dziala ??*/
  104. &:focus {
  105. outline: none;
  106. }
  107. }
  108. .footnote-tooltip {
  109. background: inherit;
  110. box-shadow: 0 1px 2px var(--shadow-color);
  111. // border: 1px solid var(--code-border);
  112. height: 1.3em;
  113. position: absolute;
  114. top: -.49em;
  115. transform: rotate(45deg);
  116. width: 1.3em;
  117. z-index: 12;
  118. .footnote-is-top & {
  119. bottom: -.49em;
  120. top: auto;
  121. }
  122. }
  123. .footnote-content {
  124. -webkit-font-smoothing: subpixel-antialiased;
  125. line-height: $magic - .2em;
  126. max-height: 15em;
  127. overflow: auto;
  128. -webkit-overflow-scrolling: touch;
  129. padding: 1em;
  130. position: relative;
  131. z-index: 8;
  132. outline: none;
  133. *:first-child {
  134. margin-top: 0;
  135. padding-top: 0;
  136. }
  137. *:last-child {
  138. margin-bottom: 0;
  139. padding-bottom: 0;
  140. }
  141. /* font-size for footnote content*/
  142. p {
  143. font-size: $footnote-font-size;
  144. }
  145. }