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

Commit

Permalink
Tables: Add more variables for table styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kristyjy committed Oct 10, 2016
1 parent 213334c commit 3a19537
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
8 changes: 5 additions & 3 deletions scss/atoms/tables/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"mixins";

.table {
@include table(map-get($table-base, margin), map-get($table-base, font-size));
@include table(map-get($table-base, margin), map-deep-get($table-base, font-size, font-size));
}

.table-full {
Expand Down Expand Up @@ -39,10 +39,12 @@
/* th */
.table-heading {
display: table-cell;
border-top: map-get($table-base, border);
border-top-width: map-get($table-base, border-width);
border-top-style: map-get($table-base, border-style);
border-top-color: map-deep-get($table-base, border-color, dark);
padding: map-get($table-base, padding);
color: map-get($colors-text, light);
font-weight: 400;
font-weight: map-get($table-base, font-weight);
font-size: map-get($table-base, thead-font-size);
}

Expand Down
2 changes: 1 addition & 1 deletion scss/atoms/typography/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
* 1. font-size: em(14px);
* 2. font-size: em(30px/14px);
*/
@function em($value, $context: map-get($typography-font-default, font-size)) {
@function em($value, $context: map-get($typography-default, font-size)) {
@return ($value / $context * 1em);
}
2 changes: 1 addition & 1 deletion scss/atoms/typography/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"mixins";

body {
font: $typography-normal #{ map-get( $typography-font-default, font-size ) }/1.5 $typography-sans;
font: $typography-normal #{ map-get( $typography-default, font-size ) }/1.5 $typography-sans;

@media ( max-width: $breakpoints-viewport-md-min ) {
font-size: 16px;
Expand Down
15 changes: 10 additions & 5 deletions scss/variables/tables.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
( function( root, factory ) {
if ( typeof define === "function" && define.amd ) {
define( [ "./chassis" ], factory );
define( [ "./chassis", "./colors", "./typograpy" ], factory );
} else if ( typeof exports === "object" ) {
module.exports = factory( require( "./chassis" ) );
require( "./chassis" );
require( "./colors" );
module.exports = factory( require( "./typography" ) );
} else {
root.chassis = factory( root.chassis );
}
Expand All @@ -13,10 +15,13 @@ chassis.table = {
name: "Table Element",
value: {
"margin": "0 0 1em",
"font-size": "16px",
"font-size": () => "typography.default",
"thead-font-size": "12px",
"border": "1px solid #eee",
"padding": "12px"
"border-width": "1px",
"border-style": "solid",
"border-color": () => "colors.default",
"padding": "12px",
"font-weight": 400
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion scss/variables/typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ chassis.typography = {
name: "Line Height",
value: lineHeight
},
"font-default": {
"default": {
name: "Type Style - Default",
value: {
"color": color,
Expand Down

0 comments on commit 3a19537

Please sign in to comment.