Skip to content

Commit

Permalink
Merge pull request #2 from Brightspace/row-selection
Browse files Browse the repository at this point in the history
Updated selection style. Update to use update typography.
  • Loading branch information
rylan committed Jan 14, 2016
2 parents 4a34309 + 9db0aad commit 3b0a02d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
],
"dependencies": {
"vui-colors": "^0.2.0",
"vui-typography": "^1.0.11"
"vui-typography": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vui-table",
"version": "0.0.1",
"version": "0.0.2",
"description": "Mixins and CSS for applying table styles",
"scripts": {
"autoprefix": "postcss -c postcss.config.json",
Expand Down
4 changes: 4 additions & 0 deletions table.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

.vui-table {
@include vui-table;
}

.vui-table-row-selected {
@include vui-table-row-selected;
}
17 changes: 11 additions & 6 deletions table.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'bower_components/vui-colors/colors.scss';
@import 'bower_components/vui-typography/typography.scss';
@import 'bower_components/vui-typography/small-text.scss';
@import 'bower_components/vui-typography/px-to-base-rem.scss';

@mixin vui-table() {
Expand All @@ -15,7 +15,7 @@
display: table-header-group;

& th {
@include _vui-table-header-cell();
@include vui-table-header-cell();
}
}

Expand All @@ -40,7 +40,7 @@
& td,
tbody th,
tfoot th {
@include _vui-table-cell();
@include vui-table-cell();
}

& tr>:last-child {
Expand Down Expand Up @@ -123,13 +123,13 @@
}
}

@mixin _vui-table-header-cell() {
@include _vui-table-cell();
@mixin vui-table-header-cell() {
@include vui-table-cell();
@include vui-typography-small-text();
background-color: $vui-color-regolith;
}

@mixin _vui-table-cell() {
@mixin vui-table-cell() {
border-bottom: 1px solid $vui-color-titanius;
border-right: 1px solid $vui-color-titanius;
display: table-cell;
Expand All @@ -141,4 +141,9 @@
[dir='rtl'] & {
text-align: right;
}
}

@mixin vui-table-row-selected() {
outline: 1px solid $vui-color-celestine;
background-color: $vui-color-celestine-light-1;
}
4 changes: 2 additions & 2 deletions test/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2>Class name</h2>
<td>of 10</td>
<td>-%</td>
</tr>
<tr>
<tr class="vui-table-row-selected">
<td>Lourdes</td>
<td>Beadle</td>
<td>of 10</td>
Expand Down Expand Up @@ -209,7 +209,7 @@ <h2>Mixins</h2>
<td>Row 2 Column 19</td>
<td>Row 2 Column 20</td>
</tr>
<tr>
<tr class="vui-table-row-selected">
<th>Row 3 Column 1</th>
<td>Row 3 Column 2</td>
<td>Row 3 Column 3</td>
Expand Down
2 changes: 2 additions & 0 deletions test/test.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import '../table.css.scss';
@import 'bower_components/vui-typography/typography.scss';


body {
@include vui-typography;
Expand Down

0 comments on commit 3b0a02d

Please sign in to comment.