Esempio n. 1
0
        /// <summary>
        /// Builds a list of classnames for this component.
        /// </summary>
        /// <param name="builder">Class builder used to append the classnames.</param>
        protected virtual void BuildClasses(ClassBuilder builder)
        {
            if (Class != null)
            {
                builder.Append(Class);
            }

            if (Margin != null)
            {
                builder.Append(Margin.Class(ClassProvider));
            }

            if (Padding != null)
            {
                builder.Append(Padding.Class(ClassProvider));
            }

            if (Display != null)
            {
                builder.Append(Display.Class(ClassProvider));
            }

            if (Border != null)
            {
                builder.Append(Border.Class(ClassProvider));
            }

            if (Flex != null)
            {
                builder.Append(Flex.Class(ClassProvider));
            }

            if (Position != null)
            {
                builder.Append(Position.Class(ClassProvider));
            }

            if (Overflow != null)
            {
                builder.Append(Overflow.Class(ClassProvider));
            }

            if (Float != Float.None)
            {
                builder.Append(ClassProvider.Float(Float));
            }

            if (Clearfix)
            {
                builder.Append(ClassProvider.Clearfix());
            }

            if (Visibility != Visibility.None)
            {
                builder.Append(ClassProvider.Visibility(Visibility));
            }

            if (VerticalAlignment != VerticalAlignment.None)
            {
                builder.Append(ClassProvider.VerticalAlignment(VerticalAlignment));
            }

            if (Width != null)
            {
                builder.Append(Width.Class(ClassProvider));
            }

            if (Height != null)
            {
                builder.Append(Height.Class(ClassProvider));
            }

            if (Casing != CharacterCasing.Normal)
            {
                builder.Append(ClassProvider.Casing(Casing));
            }

            if (TextColor != TextColor.None)
            {
                builder.Append(ClassProvider.TextColor(TextColor));
            }

            if (TextAlignment != TextAlignment.None)
            {
                builder.Append(ClassProvider.TextAlignment(TextAlignment));
            }

            if (TextTransform != TextTransform.None)
            {
                builder.Append(ClassProvider.TextTransform(TextTransform));
            }

            if (TextWeight != TextWeight.None)
            {
                builder.Append(ClassProvider.TextWeight(TextWeight));
            }

            if (TextOverflow != TextOverflow.None)
            {
                builder.Append(ClassProvider.TextOverflow(TextOverflow));
            }

            if (Background != Background.None)
            {
                builder.Append(ClassProvider.BackgroundColor(Background));
            }

            if (Shadow != Shadow.None)
            {
                builder.Append(ClassProvider.Shadow(Shadow));
            }
        }