Search code examples
htmlcssxmlsapui5footer

Class property does not added to HTML while openui5 converts XML


I add "footerAlarms" value in XML view but in HTML version it does not appear in the browser. So what can I do to see the class footerAlarms in HTML view.

<footer class="footerAlarms">
            <Toolbar>
                <ToolbarSpacer/>    
                <Link text="{i18n>readMeOss}" press="openSourceFileDownload" class="sapUiMediumMarginBegin LinkOss"/>                                           
            </Toolbar>
</footer>


footer.footerAlarms {
    height: 42px !important;
    width:calc(100%-32px);
    margin:0 16px 0 16px !important;
    background: #FFFFFF !important;
    box-shadow: 
    0 1px 0 0 rgba(255,255,255,0.60),
    inset 0 -1px 0 0 rgba(115,100,90,0.16);
}

browser image


Solution

  • My work around

    onAfterRendering : function(){
        $("footer").addClass("footerAlarms");
      }
    

    CSS

    .footerAlarms {
        height: 42px !important;
        // space is needed for the value inside braces below
        width:calc(100% - 32px);
        margin:0 16px 0 16px !important;
        background: #FFFFFF !important;
        box-shadow: 
        0 1px 0 0 rgba(255,255,255,0.60),
        inset 0 -1px 0 0 rgba(115,100,90,0.16);
    }