tile.css 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*Internet Explorer 11 compatibility workaround - IE does not support CSS variables */
  2. @media all and (-ms-high-contrast: none),
  3. (-ms-high-contrast: active) {
  4. .pf-c-tile {
  5. position: relative;
  6. display: -ms-inline-grid;
  7. display: inline-grid;
  8. padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  9. margin-bottom: 0.25rem;
  10. text-align: center;
  11. cursor: pointer;
  12. background-color: #fff;
  13. grid-template-rows: -webkit-min-content;
  14. -ms-grid-rows: -webkit-min-content;
  15. -ms-grid-rows: min-content;
  16. grid-template-rows: min-content;
  17. }
  18. .pf-c-tile::before {
  19. position: absolute;
  20. top: 0;
  21. right: 0;
  22. bottom: 0;
  23. left: 0;
  24. pointer-events: none;
  25. content: "";
  26. border: 1px solid #d2d2d2;
  27. border-radius: 3px;
  28. }
  29. .pf-c-tile:hover {
  30. border: 1px solid #06c;
  31. border-radius: 3px;
  32. }
  33. .pf-c-tile:hover .pf-c-tile__title,
  34. .pf-c-tile:hover .pf-c-tile__icon {
  35. color: #06c;
  36. }
  37. .pf-c-tile__input:checked + .pf-c-tile .pf-c-tile__title,
  38. .pf-c-tile__input:checked + .pf-c-tile .pf-c-tile__icon {
  39. color: #06c;
  40. }
  41. .pf-c-tile__input:checked + .pf-c-tile {
  42. border: 2px solid #06c;
  43. border-radius: 3px;
  44. }
  45. .pf-c-tile.pf-m-disabled {
  46. pointer-events: none;
  47. }
  48. .pf-c-tile__header {
  49. display: flex;
  50. align-items: center;
  51. justify-content: center;
  52. }
  53. .pf-c-tile__header.pf-m-stacked {
  54. flex-direction: column;
  55. justify-content: initial;
  56. }
  57. .pf-c-tile__header.pf-m-stacked .pf-c-tile__icon {
  58. display: flex;
  59. align-items: center;
  60. justify-content: center;
  61. margin-bottom: 0.25rem;
  62. }
  63. .pf-c-tile__title {
  64. color: #6a6e73;
  65. }
  66. .pf-c-tile__body {
  67. font-size: 0.75rem;
  68. color: #6a6e73;
  69. }
  70. .pf-c-tile__icon {
  71. margin-right: 0.5rem;
  72. font-size: 1.5rem;
  73. color: #6a6e73;
  74. }
  75. }
  76. /*End of the IE11 workaround*/
  77. .pf-c-tile {
  78. --pf-c-tile--PaddingTop: var(--pf-global--spacer--lg);
  79. --pf-c-tile--PaddingRight: var(--pf-global--spacer--lg);
  80. --pf-c-tile--PaddingBottom: var(--pf-global--spacer--lg);
  81. --pf-c-tile--PaddingLeft: var(--pf-global--spacer--lg);
  82. --pf-c-tile--BackgroundColor: var(--pf-global--BackgroundColor--100);
  83. --pf-c-tile--before--BorderColor: var(--pf-global--BorderColor--100);
  84. --pf-c-tile--before--BorderWidth: var(--pf-global--BorderWidth--sm);
  85. --pf-c-tile--before--BorderRadius: var(--pf-global--BorderRadius--sm);
  86. --pf-c-tile--hover--before--BorderColor: var(--pf-global--primary-color--100);
  87. --pf-c-tile--m-selected--before--BorderWidth: var(--pf-global--BorderWidth--md);
  88. --pf-c-tile--m-selected--before--BorderColor: var(--pf-global--primary-color--100);
  89. --pf-c-tile--focus--before--BorderWidth: var(--pf-global--BorderWidth--md);
  90. --pf-c-tile--focus--before--BorderColor: var(--pf-global--primary-color--100);
  91. --pf-c-tile--m-disabled--BackgroundColor: var(--pf-global--disabled-color--300);
  92. --pf-c-tile__title--Color: var(--pf-global--Color--100);
  93. --pf-c-tile--hover__title--Color: var(--pf-global--primary-color--100);
  94. --pf-c-tile--m-selected__title--Color: var(--pf-global--primary-color--100);
  95. --pf-c-tile--focus__title--Color: var(--pf-global--primary-color--100);
  96. --pf-c-tile--m-disabled__title--Color: var(--pf-global--disabled-color--100);
  97. --pf-c-tile__icon--MarginRight: var(--pf-global--spacer--sm);
  98. --pf-c-tile__icon--FontSize: var(--pf-global--icon--FontSize--md);
  99. --pf-c-tile__icon--Color: var(--pf-global--Color--100);
  100. --pf-c-tile--hover__icon--Color: var(--pf-global--primary-color--100);
  101. --pf-c-tile--m-selected__icon--Color: var(--pf-global--primary-color--100);
  102. --pf-c-tile--m-disabled__icon--Color: var(--pf-global--disabled-color--100);
  103. --pf-c-tile--focus__icon--Color: var(--pf-global--primary-color--100);
  104. --pf-c-tile__header--m-stacked__icon--MarginBottom: var(--pf-global--spacer--xs);
  105. --pf-c-tile__header--m-stacked__icon--FontSize: var(--pf-global--icon--FontSize--lg);
  106. --pf-c-tile--m-display-lg__header--m-stacked__icon--FontSize: var(--pf-global--icon--FontSize--xl);
  107. --pf-c-tile__body--Color: var(--pf-global--Color--100);
  108. --pf-c-tile__body--FontSize: var(--pf-global--FontSize--xs);
  109. --pf-c-tile--m-disabled__body--Color: var(--pf-global--disabled-color--100);
  110. position: relative;
  111. display: inline-grid;
  112. padding: var(--pf-c-tile--PaddingTop) var(--pf-c-tile--PaddingRight) var(--pf-c-tile--PaddingBottom) var(--pf-c-tile--PaddingLeft);
  113. margin-bottom: 0.25rem;
  114. text-align: center;
  115. cursor: pointer;
  116. background-color: var(--pf-c-tile--BackgroundColor);
  117. grid-template-rows: min-content;
  118. overflow: hidden;
  119. }
  120. .pf-c-tile::before {
  121. position: absolute;
  122. top: 0;
  123. right: 0;
  124. bottom: 0;
  125. left: 0;
  126. pointer-events: none;
  127. content: "";
  128. border: var(--pf-c-tile--before--BorderWidth) solid var(--pf-c-tile--before--BorderColor);
  129. border-radius: var(--pf-c-tile--before--BorderRadius);
  130. }
  131. .pf-c-tile:hover {
  132. --pf-c-tile__title--Color: var(--pf-c-tile--hover__title--Color);
  133. --pf-c-tile__icon--Color: var(--pf-c-tile--hover__icon--Color);
  134. --pf-c-tile--before--BorderColor: var(--pf-c-tile--hover--before--BorderColor);
  135. }
  136. .pf-c-tile__input:checked + .pf-c-tile {
  137. --pf-c-tile__title--Color: var(--pf-c-tile--m-selected__title--Color);
  138. --pf-c-tile__icon--Color: var(--pf-c-tile--m-selected__icon--Color);
  139. --pf-c-tile--before--BorderWidth: var(--pf-c-tile--m-selected--before--BorderWidth);
  140. --pf-c-tile--before--BorderColor: var(--pf-c-tile--m-selected--before--BorderColor);
  141. }
  142. .pf-c-tile:focus {
  143. --pf-c-tile__title--Color: var(--pf-c-tile--focus__title--Color);
  144. --pf-c-tile__icon--Color: var(--pf-c-tile--focus__icon--Color);
  145. --pf-c-tile--before--BorderWidth: var(--pf-c-tile--focus--before--BorderWidth);
  146. --pf-c-tile--before--BorderColor: var(--pf-c-tile--focus--before--BorderColor);
  147. }
  148. .pf-c-tile.pf-m-disabled {
  149. --pf-c-tile--BackgroundColor: var(--pf-c-tile--m-disabled--BackgroundColor);
  150. --pf-c-tile__title--Color: var(--pf-c-tile--m-disabled__title--Color);
  151. --pf-c-tile__body--Color: var(--pf-c-tile--m-disabled__body--Color);
  152. --pf-c-tile--before--BorderWidth: 0;
  153. --pf-c-tile__icon--Color: var(--pf-c-tile--m-disabled__icon--Color);
  154. pointer-events: none;
  155. }
  156. .pf-c-tile.pf-m-display-lg .pf-c-tile__header.pf-m-stacked {
  157. --pf-c-tile__icon--FontSize: var(--pf-c-tile--m-display-lg__header--m-stacked__icon--FontSize);
  158. }
  159. .pf-c-tile__input {
  160. display: none;
  161. }
  162. .pf-c-tile__header {
  163. display: flex;
  164. align-items: center;
  165. justify-content: center;
  166. }
  167. .pf-c-tile__header.pf-m-stacked {
  168. --pf-c-tile__icon--MarginRight: 0;
  169. --pf-c-tile__icon--FontSize: var(--pf-c-tile__header--m-stacked__icon--FontSize);
  170. flex-direction: column;
  171. justify-content: initial;
  172. }
  173. .pf-c-tile__header.pf-m-stacked .pf-c-tile__icon {
  174. display: flex;
  175. align-items: center;
  176. justify-content: center;
  177. margin-bottom: var(--pf-c-tile__header--m-stacked__icon--MarginBottom);
  178. }
  179. .pf-c-tile__title {
  180. color: var(--pf-c-tile__title--Color);
  181. }
  182. .pf-c-tile__body {
  183. font-size: var(--pf-c-tile__body--FontSize);
  184. color: var(--pf-c-tile__body--Color);
  185. }
  186. .pf-c-tile__icon {
  187. margin-right: var(--pf-c-tile__icon--MarginRight);
  188. font-size: var(--pf-c-tile__icon--FontSize);
  189. color: var(--pf-c-tile__icon--Color);
  190. }