From 2e8752b26f08b888300fad5a0e357c860ab594b2 Mon Sep 17 00:00:00 2001 From: Roland Warmerdam Date: Mon, 1 Jul 2013 10:51:08 +1200 Subject: [PATCH 1/2] Prevent the font shorthand from getting compiled as division --- less/mixins.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/less/mixins.less b/less/mixins.less index 24ca797ffd..48c0d011a9 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -71,7 +71,7 @@ // CSS image replacement // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 .hide-text() { - font: 0/0 a; + font: ~"0/0" a; color: transparent; text-shadow: none; background-color: transparent; From e5e9d5916ab6e14aff18e5fb2f9e8e1f2eccb5a1 Mon Sep 17 00:00:00 2001 From: liuyl Date: Mon, 1 Jul 2013 20:29:41 +0800 Subject: [PATCH 2/2] simplify tables.less --- less/tables.less | 72 +++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/less/tables.less b/less/tables.less index 88481a9444..392593902a 100644 --- a/less/tables.less +++ b/less/tables.less @@ -95,33 +95,31 @@ th { > tbody:first-child > tr:first-child td { border-top: 0; } - // For first th/td in the first row in the first thead or tbody - > thead:first-child > tr:first-child > th:first-child, - > tbody:first-child > tr:first-child > td:first-child, - > tbody:first-child > tr:first-child > th:first-child { - border-top-left-radius: @border-radius-base; + > thead:first-child > tr:first-child > th, + > tbody:first-child > tr:first-child > td, + > tbody:first-child > tr:first-child > th { + // For first th/td in the first row in the first thead or tbody + &:first-child{ + border-top-left-radius: @border-radius-base; + } + // For last th/td in the first row in the first thead or tbody + &:last-child{ + border-top-right-radius: @border-radius-base; + } } - // For last th/td in the first row in the first thead or tbody - > thead:first-child > tr:first-child > th:last-child, - > tbody:first-child > tr:first-child > td:last-child, - > tbody:first-child > tr:first-child > th:last-child { - border-top-right-radius: @border-radius-base; - } - // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot - > thead:last-child > tr:last-child > th:first-child, - > tbody:last-child > tr:last-child > td:first-child, - > tbody:last-child > tr:last-child > th:first-child, - > tfoot:last-child > tr:last-child > td:first-child, - > tfoot:last-child > tr:last-child > th:first-child { - border-bottom-left-radius: @border-radius-base; - } - // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot - > thead:last-child > tr:last-child > th:last-child, - > tbody:last-child > tr:last-child > td:last-child, - > tbody:last-child > tr:last-child > th:last-child, - > tfoot:last-child > tr:last-child > td:last-child, - > tfoot:last-child > tr:last-child > th:last-child { - border-bottom-right-radius: @border-radius-base; + > thead:last-child > tr:last-child > th, + > tbody:last-child > tr:last-child > td, + > tbody:last-child > tr:last-child > th, + > tfoot:last-child > tr:last-child > td, + > tfoot:last-child > tr:last-child > th { + // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot + &:first-child{ + border-bottom-left-radius: @border-radius-base; + } + // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot + &:last-child{ + border-bottom-right-radius: @border-radius-base; + } } // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot @@ -133,19 +131,17 @@ th { } // Special fixes to round the left border on the first td/th - > caption + thead > tr:first-child > th:first-child, - > caption + tbody > tr:first-child > td:first-child, - > colgroup + thead > tr:first-child > th:first-child, - > colgroup + tbody > tr:first-child > td:first-child { - border-top-left-radius: @border-radius-base; + > caption + thead > tr:first-child > th, + > caption + tbody > tr:first-child > td, + > colgroup + thead > tr:first-child > th, + > colgroup + tbody > tr:first-child > td { + &:first-child{ + border-top-left-radius: @border-radius-base; + } + &:last-child{ + border-top-right-radius: @border-radius-base; + } } - > caption + thead > tr:first-child > th:last-child, - > caption + tbody > tr:first-child > td:last-child, - > colgroup + thead > tr:first-child > th:last-child, - > colgroup + tbody > tr:first-child > td:last-child { - border-top-right-radius: @border-radius-base; - } - }