link.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /* mixins & extensions */
  2. @keyframes in {
  3. 0% {
  4. opacity: 0;
  5. }
  6. 100% {
  7. opacity: 1;
  8. }
  9. }
  10. @keyframes in-down {
  11. 0% {
  12. opacity: 0;
  13. transform: translate3D(0, -5px, 0);
  14. }
  15. 100% {
  16. opacity: 1;
  17. transform: translate3D(0, 0, 0);
  18. }
  19. }
  20. @keyframes in-up {
  21. 0% {
  22. opacity: 0;
  23. transform: translate3D(0, 5px, 0);
  24. }
  25. 100% {
  26. opacity: 1;
  27. transform: translate3D(0, 0, 0);
  28. }
  29. }
  30. @keyframes in-scale {
  31. 0% {
  32. opacity: 0;
  33. transform: scale3D(0.95, 0.95, 1);
  34. }
  35. 100% {
  36. opacity: 1;
  37. transform: scale3D(1, 1, 1);
  38. }
  39. }
  40. :root {
  41. --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
  42. --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
  43. --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
  44. --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
  45. --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
  46. }
  47. .calcite-animate {
  48. opacity: 0;
  49. animation-fill-mode: both;
  50. animation-duration: var(--calcite-animation-timing);
  51. }
  52. .calcite-animate__in {
  53. animation-name: in;
  54. }
  55. .calcite-animate__in-down {
  56. animation-name: in-down;
  57. }
  58. .calcite-animate__in-up {
  59. animation-name: in-up;
  60. }
  61. .calcite-animate__in-scale {
  62. animation-name: in-scale;
  63. }
  64. /**
  65. * Currently only used in Checkbox.
  66. */
  67. :root {
  68. --calcite-popper-transition: var(--calcite-animation-timing);
  69. }
  70. :host([hidden]) {
  71. display: none;
  72. }
  73. :host {
  74. display: inline;
  75. }
  76. :host a, :host span {
  77. position: relative;
  78. display: flex;
  79. cursor: pointer;
  80. align-items: center;
  81. justify-content: center;
  82. border-radius: 0px;
  83. border-style: none;
  84. font-family: inherit;
  85. transition-property: all;
  86. transition-duration: var(--calcite-animation-timing);
  87. transition-timing-function: ease-in-out;
  88. transition-delay: 0s;
  89. text-decoration: none;
  90. line-height: inherit;
  91. font-size: inherit;
  92. -webkit-appearance: none;
  93. }
  94. :host a:hover,
  95. :host span:hover {
  96. text-decoration: none;
  97. }
  98. :host a, :host span {
  99. outline-offset: 0;
  100. outline-color: transparent;
  101. transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
  102. }
  103. :host a:focus, :host span:focus {
  104. outline: 2px solid var(--calcite-ui-brand);
  105. outline-offset: -2px;
  106. }
  107. calcite-icon {
  108. width: 1em;
  109. height: 1em;
  110. min-width: unset;
  111. min-height: unset;
  112. }
  113. .calcite-link--icon {
  114. vertical-align: text-top;
  115. transition-property: all;
  116. transition-duration: var(--calcite-animation-timing);
  117. transition-timing-function: ease-in-out;
  118. transition-delay: 0s;
  119. margin-top: 0.125rem;
  120. }
  121. :host .calcite-link--icon.icon-start {
  122. margin-inline-end: 0.5rem;
  123. }
  124. :host .calcite-link--icon.icon-end {
  125. margin-inline-start: 0.5rem;
  126. }
  127. :host span, :host a {
  128. position: relative;
  129. display: inline;
  130. border-style: none;
  131. background-color: transparent;
  132. padding: 0px;
  133. color: var(--calcite-ui-text-link);
  134. transition-property: all;
  135. transition-duration: var(--calcite-animation-timing);
  136. transition-timing-function: ease-in-out;
  137. transition-delay: 0s;
  138. line-height: inherit;
  139. white-space: initial;
  140. background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--calcite-link-blue-underline), var(--calcite-link-blue-underline));
  141. background-position: 0% 100%, 100% 100%;
  142. background-repeat: no-repeat, no-repeat;
  143. background-size: 0% 1px, 100% 1px;
  144. }
  145. :host span:hover, :host span:focus,
  146. :host a:hover,
  147. :host a:focus {
  148. background-size: 100% 1px, 100% 1px;
  149. }
  150. :host span:active,
  151. :host a:active {
  152. background-size: 100% 2px, 100% 2px;
  153. }
  154. :host span.calcite--rtl,
  155. :host a.calcite--rtl {
  156. background-position: 100% 100%, 100% 100%;
  157. }
  158. :host([disabled]) {
  159. pointer-events: none;
  160. cursor: default;
  161. -webkit-user-select: none;
  162. user-select: none;
  163. opacity: var(--calcite-ui-opacity-disabled);
  164. }
  165. :host([disabled]) ::slotted([calcite-hydrated][disabled]),
  166. :host([disabled]) [calcite-hydrated][disabled] {
  167. /* prevent opacity stacking */
  168. opacity: 1;
  169. }