You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_richtextarea.scss 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /**
  2. *
  3. * @group richtextarea
  4. */
  5. $valo-richtextarea-use-valo-icons: true !default;
  6. /**
  7. *
  8. *
  9. * @param {string} $primary-stylename (v-richtextarea) -
  10. *
  11. * @group richtextarea
  12. */
  13. @mixin valo-richtextarea ($primary-stylename: v-richtextarea) {
  14. .#{$primary-stylename} {
  15. @include valo-textfield-style($states: normal, $padding: 0);
  16. height: auto;
  17. overflow: hidden;
  18. }
  19. .#{$primary-stylename} .gwt-RichTextToolbar {
  20. @include valo-gradient($color: $v-background-color);
  21. @include box-shadow(valo-bevel-and-shadow($bevel: $v-bevel, $background-color: $v-background-color, $gradient: $v-gradient));
  22. border-bottom: valo-border();
  23. color: valo-font-color($v-background-color);
  24. }
  25. .#{$primary-stylename} .gwt-ToggleButton,
  26. .#{$primary-stylename} .gwt-PushButton {
  27. display: inline-block;
  28. line-height: $v-unit-size;
  29. width: $v-unit-size;
  30. text-align: center;
  31. outline: none;
  32. &:hover {
  33. color: valo-font-color($v-background-color, 1);
  34. }
  35. }
  36. .#{$primary-stylename} .gwt-ToggleButton-down,
  37. .#{$primary-stylename} .gwt-ToggleButton-down-hovering {
  38. $grad: valo-gradient-style($v-gradient) valo-gradient-opacity($v-gradient)/4;
  39. //box-shadow: none;
  40. @include valo-gradient($color: darken($v-background-color, 10%), $gradient: $grad, $direction: to top);
  41. }
  42. @if $valo-richtextarea-use-valo-icons {
  43. // List of title attribute values and Valo Icons for the formatting buttons
  44. $icons: "Toggle Bold" "\f032",
  45. "Toggle Italic" "\f033",
  46. "Toggle Underline" "\f0cd",
  47. "Toggle Subscript" "\f12c",
  48. "Toggle Superscript" "\f12b",
  49. "Left Justify" "\f036",
  50. "Center" "\f037",
  51. "Right Justify" "\f038",
  52. "Toggle Strikethrough" "\f0cc",
  53. "Indent Right" "\f03c",
  54. "Indent Left" "\f03b",
  55. "Insert Horizontal Rule" "\2014",
  56. "Insert Ordered List" "\f0cb",
  57. "Insert Unordered List" "\f0ca",
  58. "Insert Image" "\f03e",
  59. "Create Link" "\f0c1",
  60. "Remove Link" "\f127",
  61. "Remove Formatting" "\f12d";
  62. .#{$primary-stylename} .gwt-RichTextToolbar-top {
  63. img {
  64. display: none;
  65. }
  66. div:before {
  67. font-family: ThemeIcons;
  68. }
  69. @each $pair in $icons {
  70. $first-of-pair: first($pair);
  71. $last-of-pair: last($pair);
  72. div[title="#{$first-of-pair}"]:before {
  73. content: "#{$last-of-pair}";
  74. }
  75. }
  76. }
  77. } // Use ThemeIcons
  78. .#{$primary-stylename} .gwt-RichTextToolbar-bottom {
  79. font-size: round($v-font-size * 0.8);
  80. padding: 0 round($v-unit-size/4) round($v-unit-size/4) 0;
  81. select {
  82. margin: round($v-unit-size/4) 0 0 round($v-unit-size/4);
  83. }
  84. }
  85. .#{$primary-stylename} .gwt-RichTextArea {
  86. background: #fff;
  87. border: none;
  88. display: block;
  89. }
  90. .#{$primary-stylename}-readonly {
  91. padding: ceil($v-unit-size/9) ceil($v-unit-size/6);
  92. background: transparent;
  93. }
  94. }