ui-preview.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // Just utils for doing UI previews
  3. // --------------------------------------------------
  4. // Animatation
  5. .ui-preview, .ui-preview-text, .ui-preview-img {
  6. background: @ui-preview-bg;
  7. background-image: linear-gradient(90deg, @ui-preview-bg, @ui-preview-light 50%, @ui-preview-bg);
  8. background-size: 1300px 1px;
  9. .animation(ui-preview-animation 2s linear infinite);
  10. }
  11. @-webkit-keyframes ui-preview-animation {
  12. from { background-position: 1300px 0; }
  13. to { background-position: 0 0; }
  14. }
  15. @keyframes ui-preview-animation {
  16. from { background-position: 1300px 0; }
  17. to { background-position: 0 0; }
  18. }
  19. // Fill
  20. .ui-preview {
  21. .fill {
  22. background-color: @body-bg;
  23. // Force icons to use faded preview color
  24. .fa, .glyphicon {
  25. color: @ui-preview-bg;
  26. }
  27. }
  28. }
  29. // Icons
  30. .ui-preview {
  31. .fill {
  32. .fa, .glyphicon {
  33. .opacity(0.6);
  34. color: @ui-preview-bg;
  35. .animation(ui-preview-icons 2s linear infinite);
  36. }
  37. }
  38. }
  39. @-webkit-keyframes ui-preview-icons {
  40. 0% { color: @ui-preview-bg; }
  41. 50% { color: @ui-preview-light; }
  42. 1000% { color: @ui-preview-bg; }
  43. }
  44. @keyframes ui-preview-icons {
  45. 0% { color: @ui-preview-bg; }
  46. 50% { color: @ui-preview-light; }
  47. 1000% { color: @ui-preview-bg; }
  48. }
  49. // Few shorthands
  50. .ui-preview-img {
  51. display: inline-block;
  52. }
  53. .ui-preview-text {
  54. border-radius: 20px;
  55. .opacity(0.6);
  56. }
  57. // Preset: list-group
  58. .ui-preview {
  59. &.list-group-preview {
  60. border-radius: @list-group-border-radius + 1;
  61. padding: 1px;
  62. &>.fill {
  63. margin-bottom: 1px;
  64. padding: 10px 15px;
  65. // Round the first and last items
  66. &:first-child {
  67. .border-top-radius(@list-group-border-radius);
  68. }
  69. &:last-child {
  70. margin-bottom: 0;
  71. .border-bottom-radius(@list-group-border-radius);
  72. }
  73. }
  74. }
  75. }