index.less 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @rate-prefix-cls: ~'@{ant-prefix}-rate';
  4. .@{rate-prefix-cls} {
  5. .reset-component();
  6. display: inline-block;
  7. margin: 0;
  8. padding: 0;
  9. color: @rate-star-color;
  10. font-size: @rate-star-size;
  11. line-height: unset;
  12. list-style: none;
  13. outline: none;
  14. &-disabled &-star {
  15. cursor: default;
  16. > div:hover {
  17. transform: scale(1);
  18. }
  19. }
  20. &-star {
  21. position: relative;
  22. display: inline-block;
  23. color: inherit;
  24. cursor: pointer;
  25. &:not(:last-child) {
  26. margin-right: 8px;
  27. }
  28. > div {
  29. transition: all 0.3s, outline 0s;
  30. &:hover {
  31. transform: @rate-star-hover-scale;
  32. }
  33. &:focus {
  34. outline: 0;
  35. }
  36. &:focus-visible {
  37. outline: 1px dashed @rate-star-color;
  38. transform: @rate-star-hover-scale;
  39. }
  40. }
  41. &-first,
  42. &-second {
  43. color: @rate-star-bg;
  44. transition: all 0.3s;
  45. user-select: none;
  46. .@{iconfont-css-prefix} {
  47. vertical-align: middle;
  48. }
  49. }
  50. &-first {
  51. position: absolute;
  52. top: 0;
  53. left: 0;
  54. width: 50%;
  55. height: 100%;
  56. overflow: hidden;
  57. opacity: 0;
  58. }
  59. &-half &-first,
  60. &-half &-second {
  61. opacity: 1;
  62. }
  63. &-half &-first,
  64. &-full &-second {
  65. color: inherit;
  66. }
  67. }
  68. &-text {
  69. display: inline-block;
  70. margin: 0 8px;
  71. font-size: @font-size-base;
  72. }
  73. }
  74. @import './rtl';