Browse Source

Adds light styling to table headers

pull/993/head
jlukic 10 years ago
parent
commit
6e7d658801
3 changed files with 28 additions and 14 deletions
  1. 7
      server/documents/collections/table.html.eco
  2. 15
      src/definitions/collections/table.less
  3. 20
      src/themes/packages/default/collections/table.variables

7
server/documents/collections/table.html.eco

@ -5,7 +5,14 @@ css : 'table'
title : 'Table' title : 'Table'
description : 'Tables display collections of data grouped into rows' description : 'Tables display collections of data grouped into rows'
type : 'UI Collection' type : 'UI Collection'
element : 'table'
elementType : 'collection'
themes : ['Default']
--- ---
<link rel="stylesheet/less" type="text/css" href="/build/less/definitions/collections/table.less" />
<script src="/javascript/table.js"></script> <script src="/javascript/table.js"></script>
<%- @partial('header') %> <%- @partial('header') %>

15
src/definitions/collections/table.less

@ -46,10 +46,12 @@
} }
/* Headers */ /* Headers */
.ui.table thead {
box-shadow: @headerBoxShadow;
}
.ui.table thead th { .ui.table thead th {
border-bottom: @headerBorder;
cursor: auto; cursor: auto;
background-color: @headerBackground;
background: @headerBackground;
text-align: @headerAlign; text-align: @headerAlign;
color: @headerColor; color: @headerColor;
padding: @headerVerticalPadding @headerHorizontalPadding; padding: @headerVerticalPadding @headerHorizontalPadding;
@ -57,19 +59,25 @@
font-style: @headerFontStyle; font-style: @headerFontStyle;
font-weight: @headerFontWeight; font-weight: @headerFontWeight;
text-transform: @headerTextTransform; text-transform: @headerTextTransform;
border-bottom: @headerBorder;
border-left: @headerDivider;
} }
.ui.table thead th:first-child { .ui.table thead th:first-child {
border-radius: @borderRadius 0em 0em 0em; border-radius: @borderRadius 0em 0em 0em;
border-left: none;
} }
.ui.table thead th:last-child { .ui.table thead th:last-child {
border-radius: 0em @borderRadius 0em 0em; border-radius: 0em @borderRadius 0em 0em;
} }
/* Footer */ /* Footer */
.ui.table tfoot {
box-shadow: @footerBoxShadow;
}
.ui.table tfoot th { .ui.table tfoot th {
cursor: auto; cursor: auto;
border-top: @footerBorder; border-top: @footerBorder;
background-color: @footerBackground;
background: @footerBackground;
text-align: @footerAlign; text-align: @footerAlign;
color: @footerColor; color: @footerColor;
padding: @footerVerticalPadding @footerHorizontalPadding; padding: @footerVerticalPadding @footerHorizontalPadding;
@ -602,6 +610,7 @@
} }
.ui.inverted.table th { .ui.inverted.table th {
background-color: @invertedHeaderBackground; background-color: @invertedHeaderBackground;
border-color: @invertedCellBorderColor;
color: @invertedHeaderColor; color: @invertedHeaderColor;
} }
.ui.inverted.table tr td { .ui.inverted.table tr td {

20
src/themes/packages/default/collections/table.variables

@ -30,8 +30,9 @@
@cellBorder: 1px solid @solidBorderColor; @cellBorder: 1px solid @solidBorderColor;
/* Table Header */ /* Table Header */
@headerBorder: 1px solid rgba(0, 0, 0, 0.1);
@headerBackground: transparent;
@headerBorder: 1px solid @solidBorderColor;
@headerDivider: 1px solid @solidBorderColor;
@headerBackground: linear-gradient(transparent, rgba(0, 0, 0, 0.03));
@headerAlign: left; @headerAlign: left;
@headerVerticalAlign: middle; @headerVerticalAlign: middle;
@headerColor: @textColor; @headerColor: @textColor;
@ -40,14 +41,17 @@
@headerFontStyle: none; @headerFontStyle: none;
@headerFontWeight: bold; @headerFontWeight: bold;
@headerTextTransform: none; @headerTextTransform: none;
@headerBoxShadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05);
/* Table Footer */ /* Table Footer */
@footerBorder: 1px solid rgba(0, 0, 0, 0.1);
@footerBoxShadow: 0px -1px 1px 0px rgba(0, 0, 0, 0.05);
@footerBorder: 1px solid @solidBorderColor;
@footerDivider: none;
@footerBackground: rgba(0, 0, 0, 0.05); @footerBackground: rgba(0, 0, 0, 0.05);
@footerAlign: left; @footerAlign: left;
@footerVerticalAlign: middle; @footerVerticalAlign: middle;
@footerColor: @textColor; @footerColor: @textColor;
@footerVerticalPadding: 1em;
@footerVerticalPadding: @cellVerticalPadding;
@footerHorizontalPadding: @cellHorizontalPadding; @footerHorizontalPadding: @cellHorizontalPadding;
@footerFontStyle: italic; @footerFontStyle: italic;
@footerFontWeight: normal; @footerFontWeight: normal;
@ -132,12 +136,9 @@
@sortableIconFont: 'Icons'; @sortableIconFont: 'Icons';
@sortableIconAscending: '\f0d7'; @sortableIconAscending: '\f0d7';
@sortableIconDescending: '\f0d8'; @sortableIconDescending: '\f0d8';
@sortableDisabledColor: @disabledTextColor; @sortableDisabledColor: @disabledTextColor;
@sortableHoverBackground: @strongTransparentBlack; @sortableHoverBackground: @strongTransparentBlack;
@sortableHoverColor: @selectedTextColor; @sortableHoverColor: @selectedTextColor;
@sortableInvertedHoverBackground: @strongTransparentWhite; @sortableInvertedHoverBackground: @strongTransparentWhite;
@sortableInvertedHoverColor: @invertedSelectedTextColor; @sortableInvertedHoverColor: @invertedSelectedTextColor;
@ -148,10 +149,8 @@
/* Inverted */ /* Inverted */
@invertedBackground: #333333; @invertedBackground: #333333;
@invertedBorder: none; @invertedBorder: none;
@invertedCellBorderColor: rgba(0, 0, 0, 0.2); @invertedCellBorderColor: rgba(0, 0, 0, 0.2);
@invertedCellColor: @invertedTextColor; @invertedCellColor: @invertedTextColor;
@invertedHeaderBackground: rgba(0, 0, 0, 0.15); @invertedHeaderBackground: rgba(0, 0, 0, 0.15);
@invertedHeaderColor: rgba(255, 255, 255, 0.9); @invertedHeaderColor: rgba(255, 255, 255, 0.9);
@ -171,9 +170,8 @@
@basicTableCellHorizontalPadding: 0em; @basicTableCellHorizontalPadding: 0em;
@basicTableStripedBackground: transparent; @basicTableStripedBackground: transparent;
/* Padded */ /* Padded */
@paddedVerticalPadding: 0.8em;
@paddedVerticalPadding: 1em;
@paddedHorizontalPadding: 1em; @paddedHorizontalPadding: 1em;
@compactVerticalPadding: 0.5em; @compactVerticalPadding: 0.5em;

Loading…
Cancel
Save