protected override void GenerateDropdownStyles(StringBuilder sb, Theme theme, ThemeDropdownOptions options)
        {
            sb.Append(".dropdown-menu").Append("{")
            .Append($"border-radius: {GetBorderRadius( theme, options?.BorderRadius, Var( ThemeVariables.BorderRadius ) )};")
            .AppendLine("}");

            if (!string.IsNullOrEmpty(theme.ColorOptions?.Primary))
            {
                var backgroundColor = ParseColor(theme.ColorOptions.Primary);

                if (!backgroundColor.IsEmpty)
                {
                    var background = ToHex(backgroundColor);
                    var color      = ToHex(Contrast(theme, background));

                    sb.Append(".dropdown-item.active,")
                    .Append(".dropdown-item:active").Append("{")
                    .Append(GetGradientBg(theme, background, options?.GradientBlendPercentage))
                    .Append($"color: {color} !important;")
                    .AppendLine("}");
                }
            }
        }
Пример #2
0
        protected override void GenerateDropdownStyles(StringBuilder sb, Theme theme, ThemeDropdownOptions options)
        {
            sb.Append($".dropdown-menu").Append("{")
            .Append($"border-radius: {GetBorderRadius( theme, options?.BorderRadius )};")
            .AppendLine("}");

            if (!string.IsNullOrEmpty(theme.ColorOptions?.Primary))
            {
                var backgroundColor = ParseColor(theme.ColorOptions.Primary);

                if (!backgroundColor.IsEmpty)
                {
                    var background = ToHex(backgroundColor);

                    sb.Append($".dropdown-item.active,")
                    .Append($".dropdown-item:active").Append("{")
                    .Append(GradientBg(theme, background))
                    .AppendLine("}");
                }
            }
        }
 protected override void GenerateDropdownStyles(StringBuilder sb, Theme theme, ThemeDropdownOptions options)
 {
     sb.Append($".dropdown-content").Append("{")
     .Append($"border-radius: {GetBorderRadius( theme, options?.BorderRadius, Var( ThemeVariables.BorderRadius ) )};")
     .AppendLine("}");
 }
Пример #4
0
 protected override void GenerateDropdownStyles(StringBuilder sb, Theme theme, ThemeDropdownOptions options)
 {
     throw new System.NotImplementedException();
 }