Open.Core.Css.GetPixelBorder C# (CSharp) Method

GetPixelBorder() public static method

Retrieves the border outline size for the given element (if it's border styles are specified in pixels).
public static GetPixelBorder ( jQueryObject element ) : Spacing
element jQueryObject The element to examine.
return Spacing
        public static Spacing GetPixelBorder(jQueryObject element)
        {
            // Setup initial conditions.
            Spacing value = new Spacing();
            if (Script.IsNullOrUndefined(element)) return value;

            // Retrieve each edge.
            value.Left = GetBorderEdge(element, Edge.Left);
            value.Top = GetBorderEdge(element, Edge.Top);
            value.Right = GetBorderEdge(element, Edge.Right);
            value.Bottom = GetBorderEdge(element, Edge.Bottom);

            // Finish up.
            return value;
        }