CSS#

CreateDynamicCSS()#

Creates and returns a CSS string from Kernel::Output::CSS modules.

my $CSS = $LayoutObject->CreateDynamicCSS();

Returns:

my $CSS = 'CSS';

ConvertToCSS()#

Converts the given Perl hash to CSS.

my $CSS = $LayOutObject->ConvertToCSS(
    Data => {
        '.StateID-1' {
            background: #50B5FF;
        }
        '.StateID-2' {
            background: #3DD598;
        }
        '.StateID-3' {
            background: #FC5A5A;
        }
        '.StateID-4' {
            background: #FFC542;
        }
        '.StateID-5' {
            background: #8D8D9B;
        }
        '.StateID-6' {
            background: #FF8A25;
        }
        '.StateID-7' {
            background: #3DD598;
        }
        '.StateID-8' {
            background: #FC5A5A;
        }
        '.StateID-9' {
            background: #8D8D9B;
        }
    },
);

Returns:

my $CSS = '
    .StateID-1 {
        background: #50B5FF;
    }
    .StateID-2 {
        background: #3DD598;
    }
    .StateID-3 {
        background: #FC5A5A;
    }
    .StateID-4 {
        background: #FFC542;
    }
    .StateID-5 {
        background: #8D8D9B;
    }
    .StateID-6 {
        background: #FF8A25;
    }
    .StateID-7 {
        background: #3DD598;
    }
    .StateID-8 {
        background: #FC5A5A;
    }
    .StateID-9 {
        background: #8D8D9B;
    }
';

CleanUpCSSSelector()#

Cleans the selector string from unwanted characters.

my $CSSSelector = $LayoutObject->CleanUpCSSSelector(
    CSSSelector => 'pending-auto-close+',
);

Returns:

my $CSSSelector = 'pending-auto-close';