From 30c5857cb7229cbb36cfad1e77d0cec0f7058ae0 Mon Sep 17 00:00:00 2001 From: Minwe Date: Wed, 10 Dec 2014 17:00:18 +0800 Subject: [PATCH] resolved #310, fixed table border in IE --- CHANGELOG.md | 4 ++++ docs/css/table.md | 26 +++++++++++++++----------- less/table.less | 26 +++++++++++++++----------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f14d49c..1e34af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ### 2014.12 W2 +**CSS:** + +- `IMPROVED` #310 调整 Table 圆角边框实现方式,解决在 IE 下显示问题(THX to [@bug](http://t.qq.com/sky14way), @infinnie) + **JS:** - `IMPROVED` 注册 Handlebars helper 和 partials 时添加 `this`, via #311 (THX to @msdlisper); diff --git a/docs/css/table.md b/docs/css/table.md index 842c4c4..78abc58 100644 --- a/docs/css/table.md +++ b/docs/css/table.md @@ -32,17 +32,19 @@ http://amazeui.org 2012-10-01 - - Amaze UI - http://amazeui.org - 2012-10-01 - - - Amaze UI - http://amazeui.org - 2012-10-01 - + + Amaze UI + http://amazeui.org + 2012-10-01 + + + + Amaze UI + http://amazeui.org + 2012-10-01 + + ````` @@ -195,7 +197,7 @@ - `.am-danger` 红色高亮。 `````html - +
@@ -383,3 +385,5 @@ ## 参考资源 - [表格排序 jQuery Table Sort] (https://github.com/kylefox/jquery-tablesort) +- [Tablesaw - A set of jQuery plugins for responsive tables](https://github.com/filamentgroup/tablesaw) +- [FooTable - jQuery plugin to make HTML tables responsive](http://fooplugins.com/plugins/footable-jquery/) diff --git a/less/table.less b/less/table.less index d26a130..5479cec 100644 --- a/less/table.less +++ b/less/table.less @@ -94,6 +94,8 @@ th { .@{ns}table { width: 100%; margin-bottom: @global-margin; + border-spacing: 0; + border-collapse: separate; .hook-table; > thead, @@ -113,7 +115,7 @@ th { // Bottom align for headings > thead > tr > th { vertical-align: bottom; - border-bottom: 2px solid @table-border-color; + border-bottom: 1px solid @table-border-color; } // Remove top border from thead @@ -130,7 +132,11 @@ th { // multiple tbody > tbody + tbody { - border-top: 2px solid @table-border-color; + tr:first-child { + td { + border-top: 2px solid @table-border-color; + } + } } } @@ -147,24 +153,22 @@ th { > tr { > th, > td { - border: 1px solid @table-border-color; + border-left: 1px solid @table-border-color; + + &:first-child { + border-left: none; + } } } } - > thead > tr { - > th, - > td { - border-bottom-width: 2px; - } - } } /* Border-radius version */ .@{ns}table-radius { - border: none; - box-shadow: 0 0 1px @gray-light; + border: 1px solid @table-border-color; + // box-shadow: 0 0 1px @gray-light; border-radius: @radius-normal; .hook-table-radius; -- GitLab
Class