protected override void GenerateButtonOutlineVariantStyles(StringBuilder sb, Theme theme, string variant, ThemeButtonOptions options)
        {
            var color = Var(ThemeVariables.OutlineButtonColor(variant));

            sb
            .Append($".btn-outline-{variant},")
            .Append($".btn-outline-{variant}.active,")
            .Append($".btn-outline-{variant}:focus,")
            .Append($".btn-outline-{variant}:hover,")
            .Append($"a.btn-outline-{variant},")
            .Append($"a.btn-outline-{variant}.active,")
            .Append($"a.btn-outline-{variant}:focus,")
            .Append($"a.btn-outline-{variant}:hover")
            .Append("{")
            .Append($"color: {color};")
            .AppendLine("}");

            sb
            .Append($".btn-outline-{variant}.disabled,")
            .Append($".btn-outline-{variant}:disabled,")
            .Append($"a.btn-outline-{variant}.disabled,")
            .Append($"a.btn-outline-{variant}:disabled")
            .Append("{")
            .Append($"color: {color};")
            .AppendLine("}");
        }
        protected override void GenerateButtonOutlineVariantStyles(StringBuilder sb, Theme theme, string variant, ThemeButtonOptions buttonOptions)
        {
            var color    = Var(ThemeVariables.OutlineButtonColor(variant));
            var yiqColor = Var(ThemeVariables.OutlineButtonYiqColor(variant));

            //var boxShadow = Var( ThemeVariables.OutlineButtonBoxShadowColor( variant ) );

            sb.Append($".button.is-{variant}.is-outlined").Append("{")
            .Append($"color: {color};")
            .Append($"border-color: {color};")
            .Append($"background-color: transparent;")
            .Append($"background: transparent;")
            .AppendLine("}");

            sb.Append($".button.is-{variant}.is-outlined:hover,")
            .Append($".button.is-{variant}.is-outlined.is-hovered,")
            .Append($".button.is-{variant}.is-outlined:focus,")
            .Append($".button.is-{variant}.is-outlined.is-focused").Append("{")
            .Append($"color: {yiqColor};")
            .Append($"background-color: white;")
            .Append($"border-color: {color};")
            .AppendLine("}");

            sb.Append($".button.is-{variant}.is-outlined.is-loading::after").Append("{")
            .Append($"border-color: transparent transparent white white;")
            .AppendLine("}");

            sb.Append($".button.is-{variant}.is-outlined[disabled],").Append($"fieldset[disabled] .button.is-{variant}.is-outlined").Append("{")
            .Append($"color: {color};")
            .Append($"background-color: transparent;")
            .Append($"border-color: {color};")
            .Append($"box-shadow: none;")
            .AppendLine("}");
        }
        protected override void GenerateButtonOutlineVariantStyles(StringBuilder sb, Theme theme, string variant, ThemeButtonOptions options)
        {
            var color     = Var(ThemeVariables.OutlineButtonColor(variant));
            var yiqColor  = Var(ThemeVariables.OutlineButtonYiqColor(variant));
            var boxShadow = Var(ThemeVariables.OutlineButtonBoxShadowColor(variant));

            sb.Append($".btn-outline-{variant}").Append("{")
            .Append($"color: {color};")
            .Append($"border-color: {color};")
            .AppendLine("}");

            sb.Append($".btn-outline-{variant}:hover").Append("{")
            .Append($"color: {yiqColor};")
            .Append($"background-color: {color};")
            .Append($"border-color: {color};")
            .AppendLine("}");

            sb.Append($".btn-outline-{variant}:focus,")
            .Append($".btn-outline-{variant}.focus")
            .Append("{")
            .Append($"box-shadow: 0 0 0 {options?.BoxShadowSize ?? ".2rem"} {boxShadow};")
            .AppendLine("}");

            sb.Append($".btn-outline-{variant}.disabled,")
            .Append($".btn-outline-{variant}:disabled")
            .Append("{")
            .Append($"color: {color};")
            .Append($"background-color: transparent;")
            .AppendLine("}");

            sb
            .Append($".btn-outline-{variant}:not(:disabled):not(.disabled):active,")
            .Append($".btn-outline-{variant}:not(:disabled):not(.disabled).active,")
            .Append($".show>.btn-outline-{variant}.dropdown-toggle")
            .Append("{")
            .Append($"color: {yiqColor};")
            .Append($"background-color: {color};")
            .Append($"border-color: {color};")
            .AppendLine("}");

            sb
            .Append($".btn-outline-{variant}:not(:disabled):not(.disabled):active:focus,")
            .Append($".btn-outline-{variant}:not(:disabled):not(.disabled).active:focus,")
            .Append($".show>.btn-outline-{variant}.dropdown-toggle:focus")
            .Append("{")
            .Append($"box-shadow: 0 0 0 {options?.BoxShadowSize ?? ".2rem"} {boxShadow};")
            .AppendLine("}");
        }
Esempio n. 4
0
        protected override void GenerateButtonOutlineVariantStyles(StringBuilder sb, Theme theme, string variant, ThemeButtonOptions buttonOptions)
        {
            var color = Var(ThemeVariables.OutlineButtonColor(variant));

            //var yiqColor = Var( ThemeVariables.OutlineButtonYiqColor( variant ) );
            //var boxShadow = Var( ThemeVariables.OutlineButtonBoxShadowColor( variant ) );

            sb.Append($".e-btn.outlined.{variant}").Append("{")
            .Append($"color: {color};")
            .Append($"background-color: white;")
            .Append($"background: white;")
            .Append($"border-color: {color};")
            .AppendLine("}");

            sb.Append($".e-btn.outlined.{variant}:hover,")
            .Append($".e-btn.outlined.{variant}:focus")
            .Append("{")
            .Append($"background-color: {color};")
            .AppendLine("}");

            //sb.Append( $".e-btn.outlined.{variant}.disabled" ).Append( $".e-btn.outlined.{variant}:disabled" ).Append( "{" )
            //    .Append( $"color: {color};" )
            //    .Append( $"background-color: transparent;" )
            //    .AppendLine( "}" );

            //sb
            //    .Append( $".e-btn.outlined.{variant}:not(:disabled):not(.disabled):active," )
            //    .Append( $".e-btn.outlined.{variant}:not(:disabled):not(.disabled).active," )
            //    .Append( $".show>.e-btn.outlined.{variant}.dropdown-toggle" )
            //    .Append( "{" )
            //    .Append( $"color: {yiqColor};" )
            //    .Append( $"background-color: {color};" )
            //    .Append( $"border-color: {color};" )
            //    .AppendLine( "}" );

            //sb
            //    .Append( $".e-btn.outlined.{variant}:not(:disabled):not(.disabled):active:focus," )
            //    .Append( $".e-btn.outlined.{variant}:not(:disabled):not(.disabled).active:focus," )
            //    .Append( $".show>.e-btn.outlined.{variant}.dropdown-toggle:focus" )
            //    .Append( "{" )
            //    .Append( $"box-shadow: 0 0 0 2rem {boxShadow};" )
            //    .AppendLine( "}" );
        }
Esempio n. 5
0
        protected override void GenerateButtonOutlineVariantStyles(StringBuilder sb, Theme theme, string variant, ThemeButtonOptions options)
        {
            var color       = Var(ThemeVariables.OutlineButtonColor(variant));
            var hoverColor  = Var(ThemeVariables.OutlineButtonHoverColor(variant));
            var activeColor = Var(ThemeVariables.OutlineButtonActiveColor(variant));

            sb.Append($".ant-btn-outline-{variant}").Append("{")
            .Append($"color: {color} !important;")
            .Append($"background: transparent !important;")
            .Append($"border-color: {color} !important;")
            .AppendLine("}");

            sb.Append($".ant-btn-outline-{variant} > a:only-child").Append("{")
            .Append($"color: currentColor !important;")
            .AppendLine("}");

            sb.Append($".ant-btn-outline-{variant}:hover,")
            .Append($".ant-btn-outline-{variant}:focus")
            .Append("{")
            .Append($"color: {hoverColor} !important;")
            .Append($"border-color: {hoverColor} !important;")
            .AppendLine("}");

            sb.Append($".ant-btn-outline-{variant}:hover > a:only-child,")
            .Append($".ant-btn-outline-{variant}:focus > a:only-child")
            .Append("{")
            .Append($"color: currentColor !important;")
            .AppendLine("}");

            sb
            .Append($".ant-btn-outline-{variant}:active,")
            .Append($".ant-btn-outline-{variant}.active")
            .Append("{")
            .Append($"color: {activeColor} !important;")
            .Append($"border-color: {activeColor} !important;")
            .AppendLine("}");

            sb
            .Append($".ant-btn-outline-{variant}:active > a:only-child,")
            .Append($".ant-btn-outline-{variant}.active > a:only-child")
            .Append("{")
            .Append($"color: currentColor !important;")
            .AppendLine("}");

            sb
            .Append($".ant-btn-outline-{variant}-disabled,")
            .Append($".ant-btn-outline-{variant}.disabled,")
            .Append($".ant-btn-outline-{variant}[disabled],")
            .Append($".ant-btn-outline-{variant}-disabled:hover,")
            .Append($".ant-btn-outline-{variant}.disabled:hover,")
            .Append($".ant-btn-outline-{variant}[disabled]:hover,")
            .Append($".ant-btn-outline-{variant}-disabled:focus,")
            .Append($".ant-btn-outline-{variant}.disabled:focus,")
            .Append($".ant-btn-outline-{variant}[disabled]:focus,")
            .Append($".ant-btn-outline-{variant}-disabled:active,")
            .Append($".ant-btn-outline-{variant}.disabled:active,")
            .Append($".ant-btn-outline-{variant}[disabled]:active,")
            .Append($".ant-btn-outline-{variant}-disabled.active,")
            .Append($".ant-btn-outline-{variant}.disabled.active,")
            .Append($".ant-btn-outline-{variant}[disabled].active")
            .Append($".btn-{variant}:disabled")
            .Append("{")
            .Append($"color: rgba(0, 0, 0, 0.25) !important;")
            .Append($"border-color: #d9d9d9 !important;")
            .Append($"text-shadow: none !important;")
            .AppendLine("}");

            sb
            .Append($".ant-btn-outline-{variant}-disabled > a:only-child,")
            .Append($".ant-btn-outline-{variant}.disabled > a:only-child,")
            .Append($".ant-btn-outline-{variant}[disabled] > a:only-child,")
            .Append($".ant-btn-outline-{variant}-disabled:hover > a:only-child,")
            .Append($".ant-btn-outline-{variant}.disabled:hover > a:only-child,")
            .Append($".ant-btn-outline-{variant}[disabled]:hover > a:only-child,")
            .Append($".ant-btn-outline-{variant}-disabled:focus > a:only-child,")
            .Append($".ant-btn-outline-{variant}.disabled:focus > a:only-child,")
            .Append($".ant-btn-outline-{variant}[disabled]:focus > a:only-child,")
            .Append($".ant-btn-outline-{variant}-disabled:active > a:only-child,")
            .Append($".ant-btn-outline-{variant}.disabled:active > a:only-child,")
            .Append($".ant-btn-outline-{variant}[disabled]:active > a:only-child,")
            .Append($".ant-btn-outline-{variant}-disabled.active > a:only-child,")
            .Append($".ant-btn-outline-{variant}.disabled.active > a:only-child,")
            .Append($".ant-btn-outline-{variant}[disabled].active")
            .Append($".btn-{variant}:disabled")
            .Append("{")
            .Append($"color: currentColor !important;")
            .AppendLine("}");
        }