/*
    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.
*/
// Tables
//      Inherit from bootstrap/tables.less, with some minor tweaks

// JSPWiki generates by default <table border="1">
// BETTER: remove the border="1" from wikitables, and leave styling upto the css boys
table[border="1"],
table[border="1"] th,
table[border="1"] td { border:0; }

.wikitable {

    .table();  //inherit from bootstrap

    // JSPWiki does not generate thead or tbody elements.
    // Remove the top border from thead by default
    // and add 2px to the bottom border for header rows
    tr:first-child {
        th, td {
            vertical-align: top; //fix bootstrap th setting

        }
        th {
            border-bottom: 1px solid @table-border-color;
        }
    }


    &.table-fit { width:auto; }

	&.table-condensed {
		th, td { padding: @table-condensed-cell-padding; }
	}

}

.table-bordered {
	border:none;
}
.table-bordered table {
        border: 1px solid @table-border-color;

        tr:first-child {
            th, td { border-top: 1px solid @table-border-color; }
        }
}

.wikitable.table-noborder ,
.wikitable.table-borderless {
	td, tr:first-child th {
	    border: 0;
	}
}

.table-fit .wikitable {  width:auto; }

.table-striped {
  > tbody > tr:nth-child(odd) {
    > td,
    > th {
      background-color: @table-bg-accent;
    }
  }
}
//zebra-table default striping ; adopt default color of bootstrap
[class*=zebra] .odd { background-color: @table-bg-accent; }