/*
    JSPWiki - a JSP-based WikiWiki clone.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); fyou 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.
*/
/*
GraphBar

DOM Structure
(start code)
    // horizontal bar
    span.graphBar[style="border-left-width: 85px;"]x
    span.gBar 150

    // vertical bar
    div[style="height: 77px; position: relative;"]
       span.graphBar[style="border-color: rgb(255, 0, 0);
                    border-bottom-width: 20px;
                    position: absolute;
                    width: 20px;
                    bottom: 0px;]
       span[style="position: relative; top: 40px;] 20

    // progress bar
    span.graphBar[style="border-color:red; border-left-width: 20px;"]x
    span.graphBar[style="border-color:blue; border-left-width: 300px; margin-left: -1ex;"]x
    span.gBar 100
(end)

BOOTSTRAP
(start code)
    // original DOM-structure
    div.graphBar-(options)
        span.gbBar 100

    //becomes, based on BOOTSTRAP
    //horizontal bar
    span.gb-group(.striped.active)[width:125px]
      span.gb-bar[style="background:blue;width:40%"]
    span.gBar 100

    //vertical bar
    span.gb-group(.striped.active)(.vertical)[heigh:125px]
      span.gb-bar[style="background:blue;height:100%;width:100%"]
    span.gBar 100

    //progress bar
    span.gb-group[width:125px]
      span.gb-bar[style="background:blue;width:40%"]
      span.gb-bar[style="background:red;width:60%"]
    span.gbBar 100
(end)
*/

.gb-group {
    .progress;
    display: inline-block;
    vertical-align: middle;

    margin: 0 .5em .25em 0;
    width: 320px; //default size
    &.vertical {
        width: @line-height-computed;
        .gb-bar { width:100%; }
    }
}
.gb-bar { .progress-bar;  }
.striped > .gb-bar { .progress-striped .progress-bar; }
.active > .gb-bar { .progress.active .progress-bar; }


//Repeated styles from bootstrap/progress-bars.less
//.gb-bar has equal priority, so the order matters to overwrite the background-color!
.progress-bar-success { .progress-bar-variant(@progress-bar-success-bg); }
.progress-bar-info    { .progress-bar-variant(@progress-bar-info-bg); }
.progress-bar-warning { .progress-bar-variant(@progress-bar-warning-bg); }
.progress-bar-danger  { .progress-bar-variant(@progress-bar-danger-bg); }
