src/aria/widgets/IconStyle.tpl.css
/*
 * Copyright 2012 Amadeus s.a.s.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

{CSSTemplate {
    $classpath : "aria.widgets.IconStyle",
    $extends : "aria.widgets.WidgetStyle",
    $dependencies : ["aria.widgets.environment.WidgetSettings"]
}}
    {var skinnableClassName="Icon"/}

    {macro writeSkinClass(info)}
        {var widgetSettings = aria.widgets.environment.WidgetSettings.getWidgetSettings() /}

        /* Icon class: ${info.skinClassName} */
        {if info.skinClass.spriteURL}
            .xICN${info.skinClassName}:focus {
                outline-width: initial;
            }

            .xICN${info.skinClassName} {
                {if !widgetSettings.middleAlignment}vertical-align:top;{/if}
                font-size:1px;
                width:${info.skinClass.iconWidth}px;
                height:${info.skinClass.iconHeight}px;
                {call background(info.skinClass.backgroundColor,info.skinClass.spriteURL,"no-repeat top left") /}
                {if info.skinClass.backgroundSize}
                    background-size:${info.skinClass.backgroundSize}%;
                {/if}
                border-top: ${info.skinClass.borderTop}px;
                border-right: ${info.skinClass.borderRight}px;
                border-bottom: ${info.skinClass.borderBottom}px;
                border-left: ${info.skinClass.borderLeft}px;
                {call writeBorderRadius(info.skinClass)/}
                {if info.skinClass.borderStyle}
                  border-style: ${info.skinClass.borderStyle};
                {/if}
                {if info.skinClass.borderColor}
                  border-color: ${info.skinClass.borderColor};
                {/if}
            }
        {/if}

        {if info.skinClassName == "checkBoxes" && !widgetSettings.middleAlignment}
            .xICN${info.skinClassName} {
                vertical-align:middle;
            }
        {/if}
    {/macro}

{/CSSTemplate}
