Skip to content
This repository has been archived by the owner on Dec 11, 2021. It is now read-only.

Commit

Permalink
Tables: Add variables for base table styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kristyjy committed Mar 23, 2016
1 parent edb060c commit 6f0fa30
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
5 changes: 5 additions & 0 deletions scss/atoms/tables/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
* ==========================================================================
* Table mixins
* ==========================================================================
*/
25 changes: 14 additions & 11 deletions scss/atoms/tables/_tables.scss
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
/*
* ==========================================================================
* Typography
* Tables
* ==========================================================================
*/

@import
"dist/chassis",
"mixins";

table {
width: 100%;
margin-bottom: em( 20px, 16px );
font-size: em( 16px );
margin: map-get($table-base, margin);
font-size: map-get($table-base, font-size);
text-align: left;
}

thead {
border-bottom: 1px solid #eee;

border-bottom: map-get($table-base, border);
> tr > th {
border-top: 0;
}
}

td {
border-top: 1px solid #eee;
padding: em( 12px, 16px );
border-top: map-get($table-base, border);
padding: map-get($table-base, padding);
}

th {
border-top: 1px solid #eee;
padding: em( 12px, 12px );
color: #666;
border-top: map-get($table-base, border);
padding: map-get($table-base, padding);
color: map-get($table-base, color);
font-weight: 400;
font-size: em( 12px, 16px );
font-size: map-get($table-base, thead-font-size);
white-space: nowrap;
}

Expand Down
26 changes: 26 additions & 0 deletions scss/variables/tables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
( function( root, factory ) {
if ( typeof define === "function" && define.amd ) {
define( [ "./chassis" ], factory );
} else if ( typeof exports === "object" ) {
module.exports = factory( require( "./chassis" ) );
} else {
root.chassis = factory( root.chassis );
}
}( this, function( chassis ) {

chassis.table = {
"table-base": {
name: "Table Element",
value: {
"margin": "0 0 1em",
"font-size": "16px",
"thead-font-size" : "12px",
"border": "1px solid #eee",
"padding" : "12px",
"color" : "#666"
}
},
};

return chassis;
} ) );

0 comments on commit 6f0fa30

Please sign in to comment.