How to use the csx.px function in csx

To help you get started, we’ve selected a few csx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vanilla / vanilla / library / src / scripts / styles / styleHelpersPositioning.ts View on Github external
    bottomRight: (bottom: BottomProperty = px(0), right: RightProperty = px(0)) => {
        return {
            position: "absolute" as PositionProperty,
            bottom: unit(bottom),
            right: unit(right),
        };
    },
    bottomLeft: (bottom: BottomProperty = px(0), left: LeftProperty = px(0)) => {
github vanilla / vanilla / library / src / scripts / styles / styleHelpersPositioning.ts View on Github external
    topLeft: (top: string | number = "0", left: LeftProperty = px(0)) => {
        return {
            position: "absolute" as PositionProperty,
            top: unit(top),
            left: unit(left),
        };
    },
    bottomRight: (bottom: BottomProperty = px(0), right: RightProperty = px(0)) => {
github vanilla / vanilla / library / src / scripts / styles / styleHelpersPositioning.ts View on Github external
    topRight: (top: string | number = "0", right: RightProperty = px(0)) => {
        return {
            position: "absolute" as PositionProperty,
            top: unit(top),
            right: unit(right),
        };
    },
    topLeft: (top: string | number = "0", left: LeftProperty = px(0)) => {
github vanilla / vanilla / library / src / scripts / styles / layoutStyles.ts View on Github external
const twoColumns = styles => {
            return media({ maxWidth: px(panelLayoutBreakPoints.twoColumn) }, styles);
        };
github vanilla / vanilla / library / src / scripts / styles / layoutStyles.ts View on Github external
const xs = styles => {
            return media({ maxWidth: px(panelLayoutBreakPoints.xs) }, styles);
        };
github vanilla / vanilla / library / src / scripts / styles / layoutStyles.ts View on Github external
const oneColumn = styles => {
            return media({ maxWidth: px(panelLayoutBreakPoints.oneColumn) }, styles);
        };
github vanilla / vanilla / library / src / scripts / layout / types / oneColumn.ts View on Github external
const small = (styles: NestedCSSProperties, useMinWidth: boolean = true) => {
            return media(
                {
                    maxWidth: px(breakPoints.small),
                    minWidth: useMinWidth ? px(breakPoints.xs + 1) : undefined,
                },
                styles,
            );
        };
github vanilla / vanilla / applications / dashboard / src / scripts / compatibilityStyles / forumLayoutStyles.ts View on Github external
const xs = (styles: NestedCSSProperties) => {
            return media(
                {
                    maxWidth: px(foundationalWidths.breakPoints.xs),
                },
                styles,
            );
        };
github wmaurer / cyclejs-fractals / src / app.styles.ts View on Github external
const track = (): types.CSSProperties => ({
        cursor: 'pointer',
        height: px(trackHeight),
        transition: 'all .2s ease',
        width: trackWidth
    });
github vanilla / vanilla / library / src / scripts / layout / types / threeColumn.ts View on Github external
const noBleed = (styles: NestedCSSProperties, useMinWidth: boolean = true) => {
                return media(
                    {
                        maxWidth: px(breakPoints.noBleed),
                        minWidth: useMinWidth ? px(breakPoints.twoColumns + 1) : undefined,
                    },
                    styles,
                );
            };

csx

Utility functions for TypeStyle

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis