sapui5 - Sap UI 5 css on button -


i trying implement css on button. not working.

<core:view controllername="sap.hcm.address" xmlns="sap.ui.commons" xmlns:core="sap.ui.core"  xmlns:html="http://www.w3.org/1999/xhtml">    <html:style>       .mysuperredbutton {          color: red;       }    </html:style>    <panel>       <button class="mysuperredbutton" text="press me!"/>    </panel> <core:view> 

reference link: http://www.spyvee.com/saphtml5_demokit/docs/guide/mvc.html

the button consists of multiple html/dom elements. there might styles applied on of inner control elements well. happened in case:

.sapmbtninner {   color: #333333; } 

overrides css. can overcome either using !important (the less-preferable way):

.mysuperredbutton {   color: red !important; } 

or referencing inner class:

.mysuperredbutton .sapmbtninner {   color: red; } 

if more interested in inner html of control can either check dom or controls renderer class.

btw: should include css separate file better reuse , cleaner project structure.

br chris


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -