public void AreSizes(string expected, SpacingSize spacingSize)
        {
            var padding = new FluentPadding();

            padding.WithSize(spacingSize);

            var classname = padding.Class(classProvider);

            Assert.Equal(expected, classname);
        }
        public void AreSizes(string expected, SpacingSize spacingSize)
        {
            var margin = new FluentMargin();

            margin.WithSize(spacingSize);

            var classname = margin.Class(classProvider);

            Assert.Equal(expected, classname);
        }
        public void AreBreakpoints_OnAll(string expected, SpacingSize spacingSize, Side side, Breakpoint breakpoint)
        {
            var padding = new FluentPadding();

            padding.WithSize(spacingSize);

            if (side != Side.None)
            {
                padding.WithSide(side);
            }

            if (breakpoint != Breakpoint.None)
            {
                padding.WithBreakpoint(breakpoint);
            }

            var classname = padding.Class(classProvider);

            Assert.Equal(expected, classname);
        }
        public void AreBreakpoints_OnAll(string expected, SpacingSize spacingSize, Side side, Breakpoint breakpoint)
        {
            var margin = new FluentMargin();

            margin.WithSize(spacingSize);

            if (side != Side.None)
            {
                margin.WithSide(side);
            }

            if (breakpoint != Breakpoint.None)
            {
                margin.WithBreakpoint(breakpoint);
            }

            var classname = margin.Class(classProvider);

            Assert.Equal(expected, classname);
        }
Beispiel #5
0
        public IFluentSpacingOnBreakpointWithSideAndSize WithSize(SpacingSize spacingSize)
        {
            var spacingDefinition = new SpacingDefinition {
                Breakpoint = Breakpoint.None, Side = Side.All
            };

            if (!rules.ContainsKey(spacingSize))
            {
                rules.Add(spacingSize, new List <SpacingDefinition>()
                {
                    spacingDefinition
                });
            }
            else
            {
                rules[spacingSize].Add(spacingDefinition);
            }

            currentSpacing = spacingDefinition;
            Dirty();
            return(this);
        }