index.less 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .@{wux-prefix}-image {
  4. position: relative;
  5. overflow: hidden;
  6. display: flex;
  7. box-sizing: border-box;
  8. &--rounded {
  9. border-radius: @border-radius-base;
  10. }
  11. &--circle {
  12. border-radius: 50%;
  13. }
  14. &--thumbnail {
  15. background-color: @component-background;
  16. border-radius: @border-radius-base;
  17. &::after {
  18. .hairline(@border-color-split);
  19. border-width: @border-width-base;
  20. border-radius: 8px;
  21. }
  22. }
  23. &--thumbnail &__inner,
  24. &--thumbnail &__mask {
  25. top: 4px;
  26. right: 4px;
  27. bottom: 4px;
  28. left: 4px;
  29. width: calc(~"100% - 8px") !important;
  30. height: calc(~"100% - 8px") !important;
  31. }
  32. &--widthFix &__inner {
  33. position: relative;
  34. }
  35. image,
  36. &__thumb {
  37. display: inline-block;
  38. overflow: hidden;
  39. width: 100%;
  40. height: 100%;
  41. vertical-align: middle;
  42. }
  43. &__inner {
  44. position: absolute;
  45. top: 0;
  46. right: 0;
  47. bottom: 0;
  48. left: 0;
  49. z-index: 10;
  50. width: 100%;
  51. height: 100%;
  52. opacity: 0;
  53. }
  54. &--loaded &__inner {
  55. opacity: 1;
  56. }
  57. &__mask {
  58. position: absolute;
  59. top: 0;
  60. right: 0;
  61. bottom: 0;
  62. left: 0;
  63. z-index: 20;
  64. &--text {
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. }
  69. }
  70. &__text {
  71. color: @text-color-secondary;
  72. text-align: center;
  73. padding: 10px;
  74. }
  75. }