String () { var trackColor = getCssColor(ScrollBarPainter.TRACK_OPAQUE_BACKGROUND); var trackHoveredColor = getCssColor(ScrollBarPainter.TRACK_OPAQUE_HOVERED_BACKGROUND); var thumbColor = getCssColor(ScrollBarPainter.THUMB_OPAQUE_BACKGROUND); var thumbHoveredColor = getCssColor(ScrollBarPainter.THUMB_OPAQUE_HOVERED_BACKGROUND); var thumbBorderColor = getCssColor(ScrollBarPainter.THUMB_OPAQUE_FOREGROUND); var thumbBorderHoveredColor = getCssColor(ScrollBarPainter.THUMB_OPAQUE_HOVERED_FOREGROUND); if (thumbBorderColor.equals(thumbColor)) { // See com.intellij.ui.components.ScrollBarPainter#Thumb. In this case we ignore the borders thumbBorderColor = TRANSPARENT_CSS_COLOR; } if (thumbBorderHoveredColor.equals(thumbHoveredColor)) { // See com.intellij.ui.components.ScrollBarPainter#Thumb. In this case we ignore the borders thumbBorderHoveredColor = TRANSPARENT_CSS_COLOR; } final int thumbBorderWidthPx = 1; int trackSizePx = getTrackSizePx(); int thumbPaddingPx = getThumbPaddingPx(); int thumbRadiusPx = getThumbRadiusPx(); int thumbSizePercent = 100; return ".os-scrollbar {\n" + " --os-size: " + trackSizePx + "px;\n" + " --os-padding-perpendicular: " + (thumbPaddingPx + thumbBorderWidthPx) + "px;\n" + " --os-handle-border-radius: " + thumbRadiusPx + "px;\n" + " --os-track-border-radius: 0;" + " --os-track-bg: " + trackColor + ";\n" + " --os-track-bg-active: " + trackColor + ";\n" + " --os-track-bg-hover: " + trackHoveredColor + ";\n" + " --os-handle-bg: " + thumbColor + ";\n" + " --os-handle-bg-active: " + thumbColor + ";\n" + " --os-handle-bg-hover: " + thumbHoveredColor + ";\n" + " --os-handle-perpendicular-size: " + thumbSizePercent + "%;\n" + " --os-handle-perpendicular-size-hover: " + thumbSizePercent + "%;\n" + " --os-handle-perpendicular-size-active: " + thumbSizePercent + "%;\n" + "}\n" + ".os-scrollbar-handle {" + " outline: " + thumbBorderWidthPx + "px solid " + thumbBorderColor + ";\n" + "}" + ".os-scrollbar-handle:hover {" + " outline: " + thumbBorderWidthPx + "px solid " + thumbBorderHoveredColor + ";\n" + "}" + ".os-scrollbar-handle:active {" + " outline: " + thumbBorderWidthPx + "px solid " + thumbBorderHoveredColor + ";\n" + "}" ; }