vertigo 0.2.0-alpha

Reactive Real-DOM library for Rust
Documentation
Parsing css attributes;

Version1 ->
    ":" - start value,
    {} - ignorowane w środku
    ";" - end value

key: value;

OR

Version2 ->
    "{" - start value,
    "}" - end value

name { ... }


Add prefix
transform: scale(1.0);
-webkit-transform: scale(1.0);


/*

fn custom_css() -> Css {
    Css::one("
        width: 40px;
        height: 40px;
        background-color: #d26913;

        border-radius: 100%;
        animation: 1.0s infinite ease-in-out {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }
            100% {
                -webkit-transform: scale(1.0);
                transform: scale(1.0);
                opacity: 0;
            }
        };
        animation-name {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }
            100% {
                -webkit-transform: scale(1.0);
                transform: scale(1.0);
                opacity: 0;
            }
        }
        :hover {
            color: red;
        }
        hover {
            color: red;
        }
        background-color: blue;
    ")

    Css::one("
        margin: 15px auto;
        td {
            min-width: 125px;
            padding: 5px 0;
            text-align: center;
            :first-of-type {
                text-align: left; 
            }
            strong {
                color: ${({ theme }): string => theme.sass['$depositLimitsPopup-td-strong-color']};
            }
        }
        text-align: left;
        :hover {
            background-color: transparent;
        }
        :last-of-type {
            text-align: right;
        }
        .Select-option {
            border-bottom: 1px solid ${({ theme }): string => theme.star.accountGeneral.accPaymentDropDownBorderColor};
            
            :hover {
                background: ${({ theme }): string => theme.star.accountGeneral.accPaymentDropDownOptionHover};
            }
        }
        & > * {
            background-color: ${({ theme }): string => theme.star.status.inputError};
            color: ${({ theme }): string => theme.star.defaultColors.white};
            font-size: ${({ theme }): string => theme.star.fontSize.xSmall} !important;
            font-weight: ${({ theme }): string => theme.star.formMessage.errorFontWeight};
            line-height: 1;
            margin: 0 0 20px;
            padding: 4px 8px;
            position: relative;
        }
        width: 100%;
        @media screen and (min-width: 768px) {
            font-size: 18px;
        }
        :focus {
            outline: none;
        }
        :first-of-type {
            padding-left: 0;
            @media ${({ theme }): string => theme.mediaQuery.tablet} {
                padding-left: 7px;
            }
            @media ${({ theme }): string => theme.mediaQuery.desktop} {
                padding-left: 10px;
            }
        }
        :last-of-type {
            padding-right: 0;
        }
        ::after {
            background-color: ${({ theme }): string => theme.colors.white};
            content: '';
            height: 1px;
            left: 0;
            position: absolute;
            right: 0;
            top: 0;
            width: 100%;
        }

        ::after {
            background-color: currentColor;
            bottom: 2px;
            content: '';
            height: 1px;
            left: 0;
            opacity: 1;
            position: absolute;
            right: 0;
        }
        :hover {
            ::after {
                transition: opacity 0.2s ease;
                opacity: 0;
            }
        }

        align-items: center;
        display: flex;
        flex-flow: column nowrap;
        justify-content: space-between;
        min-width: 84px;
        padding: 0 10px;
        position: relative;
        :not(:last-child) {
            ::after {
                background-color: ${({ theme }): string => theme.colors.white};
                bottom: 0;
                content: '';
                height: calc(100% - 6px);
                margin: auto 0;
                position: absolute;
                right: 0;
                top: 0;
                width: 2px;
                @media ${({ theme }): string => theme.mediaQuery.tablet} {
                    height: calc(100% - 26px);
                    width: 1px;
                }
            }
        }
        @media ${({ theme }): string => theme.mediaQuery.tablet} {
            border-bottom: 1px solid ${({ theme }): string => theme.colors.white};
            border-top: 1px solid ${({ theme }): string => theme.colors.white};
            min-width: 66px;
            padding: 8px 0;
        }
        @media ${({ theme }): string => theme.mediaQuery.desktop} {
            min-width: 94px;
            padding: 10px 0;
        }

        &:hover {
            color: ${({ theme }): string => theme.colors.black};
        }
        &:not(:last-of-type) {
            margin-bottom: 13px;
        }

        padding: 10px;
        svg {
            fill: #000;
        }

    ""
}


W tym ponizszym przypadku, przecinek musimy wyniesc na najwyzszy poziom.
potencjanie niebezpieczny ten przecinek ?

export const StaticPageWrapper = styled.div`
    flex: 1 0 100%;
    padding: 16px;
    overflow: initial;
    overflow-x: hidden;
    line-height: 1.6;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin: 0 0 5px 0;
        line-height: 1.3;
        padding: 0;
        color: ${props => props.theme.carousel.mainColor.blue4};
        font-weight: 500;
    }
    
    h1 {
        font-size: 14px;
        text-align: center;
    }
    
    h2 {
        font-size: 18px;
        text-align: center;
    }

    p {
        font-size: 12px;
        margin-top: 0;
        line-height: 1.6;
    }

    dd .icon {
        margin-right: 5px;
    }

    ul, ol {
        font-size: 12px;
        padding: 5px 0;
        list-style: none;
        margin: 0;

        & > li {
            padding-left: 20px;
            position: relative;
            margin-bottom: 10px;

            &::before {
                content: '';
                position: absolute;
                border-radius: 50px;
                border: 1px solid ${props => props.theme.carousel.mainColor.shade7};
                display: block;
                width: 10px;
                height: 10px;
                left: 0;
                top: 0.65em;
            }
        }
    }
`;



To co jest po prawej stronie będzie ulegało transformacji.

jeśli klucz "animation" lub "animation-name" to wyciągnij animację z wartości

jeśli klucz "hover", to wyciągnij pseudoklasę do osobnego selektora ...


funkcja transformująca css-y, będzie dostawała jako parametr funkcję, która będzie potrafiła wstawić kawałek css-a i przydzeilić nowy class_id
*/