code: function () {
                      var style = this._averageRatingElement.style;
                      var nextStyle = this._averageRatingElement.nextSibling.style;
                      if (_ElementUtilities._getComputedStyle(this._element).direction === "rtl") {
                          style.backgroundPosition = "right";
                          style.paddingRight = this._elementPadding;
                          style.borderRight = this._elementBorder;
                          nextStyle.paddingRight = "0px";
                          nextStyle.borderRight = "0px";
                          nextStyle.direction = "ltr";
                      } else {
                          style.backgroundPosition = "left";
                          nextStyle.backgroundPosition = "right";
                          style.paddingLeft = this._elementPadding;
                          style.borderLeft = this._elementBorder;
                          nextStyle.paddingLeft = "0px";
                          nextStyle.borderLeft = "0px";
                          nextStyle.direction = "rtl";
                      }
                      _ElementUtilities._setFlexStyle(this._averageRatingElement, { grow: this._floatingValue, shrink: this._floatingValue });
                      style.width = this._resizeStringValue(this._elementWidth, this._floatingValue, style.width);
                      style.backgroundSize = (100 / this._floatingValue) + "% 100%";
                      style.display = _ElementUtilities._getComputedStyle(this._averageRatingElement.nextSibling).display;
                      this._averageRatingHidden = false;
                      _ElementUtilities._setFlexStyle(this._averageRatingElement.nextSibling, { grow: 1 - this._floatingValue, shrink: 1 - this._floatingValue });
                      nextStyle.width = this._resizeStringValue(this._elementWidth, 1 - this._floatingValue, nextStyle.width);
                      nextStyle.backgroundSize = (100 / (1 - this._floatingValue)) + "% 100%";
                  }
docs: Average rating star is created from 2 divs: In the first div the glyph starts from the beginning in the direction of the control In the second div the glyph starts from the beginning in the opposite direction That way we are making the average star look like one glyph