ui-preview.less 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. .material-icons {
  25. color: @ui-preview-bg;
  26. }
  27. }
  28. }
  29. // Few shorthands
  30. .ui-preview-img {
  31. display: inline-block;
  32. &>* {
  33. .opacity(0);
  34. }
  35. }
  36. .ui-preview-text {
  37. border-radius: 20px;
  38. .opacity(0.6);
  39. color: transparent;
  40. }
  41. // Preset: list-group
  42. .ui-preview .list-group-preview {
  43. border-radius: @list-group-border-radius;
  44. .shadow-2dp();
  45. &>.fill {
  46. margin-bottom: 1px;
  47. padding: 10px 15px;
  48. // Round the first and last items
  49. &:first-child {
  50. .border-top-radius(@list-group-border-radius);
  51. }
  52. &:last-child {
  53. margin-bottom: 0;
  54. .border-bottom-radius(@list-group-border-radius);
  55. }
  56. }
  57. }