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

Commit 3a19537

Browse files
committed
Tables: Add more variables for table styles
1 parent 213334c commit 3a19537

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

Diff for: scss/atoms/tables/_tables.scss

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"mixins";
1010

1111
.table {
12-
@include table(map-get($table-base, margin), map-get($table-base, font-size));
12+
@include table(map-get($table-base, margin), map-deep-get($table-base, font-size, font-size));
1313
}
1414

1515
.table-full {
@@ -39,10 +39,12 @@
3939
/* th */
4040
.table-heading {
4141
display: table-cell;
42-
border-top: map-get($table-base, border);
42+
border-top-width: map-get($table-base, border-width);
43+
border-top-style: map-get($table-base, border-style);
44+
border-top-color: map-deep-get($table-base, border-color, dark);
4345
padding: map-get($table-base, padding);
4446
color: map-get($colors-text, light);
45-
font-weight: 400;
47+
font-weight: map-get($table-base, font-weight);
4648
font-size: map-get($table-base, thead-font-size);
4749
}
4850

Diff for: scss/atoms/typography/_functions.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
* 1. font-size: em(14px);
1212
* 2. font-size: em(30px/14px);
1313
*/
14-
@function em($value, $context: map-get($typography-font-default, font-size)) {
14+
@function em($value, $context: map-get($typography-default, font-size)) {
1515
@return ($value / $context * 1em);
1616
}

Diff for: scss/atoms/typography/_typography.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"mixins";
1111

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

1515
@media ( max-width: $breakpoints-viewport-md-min ) {
1616
font-size: 16px;

Diff for: scss/variables/tables.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
( function( root, factory ) {
22
if ( typeof define === "function" && define.amd ) {
3-
define( [ "./chassis" ], factory );
3+
define( [ "./chassis", "./colors", "./typograpy" ], factory );
44
} else if ( typeof exports === "object" ) {
5-
module.exports = factory( require( "./chassis" ) );
5+
require( "./chassis" );
6+
require( "./colors" );
7+
module.exports = factory( require( "./typography" ) );
68
} else {
79
root.chassis = factory( root.chassis );
810
}
@@ -13,10 +15,13 @@ chassis.table = {
1315
name: "Table Element",
1416
value: {
1517
"margin": "0 0 1em",
16-
"font-size": "16px",
18+
"font-size": () => "typography.default",
1719
"thead-font-size": "12px",
18-
"border": "1px solid #eee",
19-
"padding": "12px"
20+
"border-width": "1px",
21+
"border-style": "solid",
22+
"border-color": () => "colors.default",
23+
"padding": "12px",
24+
"font-weight": 400
2025
}
2126
}
2227
};

Diff for: scss/variables/typography.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ chassis.typography = {
3434
name: "Line Height",
3535
value: lineHeight
3636
},
37-
"font-default": {
37+
"default": {
3838
name: "Type Style - Default",
3939
value: {
4040
"color": color,

0 commit comments

Comments
 (0)