From 233e050adfc171685fd2c2f6ad760a8556aa0eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstro=CC=88m?= Date: Fri, 26 Oct 2012 09:47:55 +0200 Subject: Adding .inline for ul and ol --- less/type.less | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'less') diff --git a/less/type.less b/less/type.less index 3b428e79d..883c476a8 100644 --- a/less/type.less +++ b/less/type.less @@ -117,6 +117,21 @@ ol.unstyled { margin-left: 0; list-style: none; } +ul.inline, +ol.inline { + .clearfix(); +} +ul.inline > li, +ol.inline > li { + float: left; + margin-right: 14px; + margin-left: 12px; +} +// Reset left padding for unstyled +ul.unstyled.inline > li, +ol.unstyled.inline > li { + padding-left: 0; +} // Description Lists dl { -- cgit v1.2.3 From 28da31218fc5dc39ece625705c37b8c86d494801 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 4 Nov 2012 12:36:37 -0800 Subject: Refine new inline list option --- less/type.less | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'less') diff --git a/less/type.less b/less/type.less index d23ecc917..0d5b9c37e 100644 --- a/less/type.less +++ b/less/type.less @@ -106,25 +106,23 @@ ol ul { li { line-height: @baseLineHeight; } + +// Remove default list styles ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } + +// Single-line list items ul.inline, ol.inline { - .clearfix(); -} -ul.inline > li, -ol.inline > li { - float: left; - margin-right: 14px; - margin-left: 12px; -} -// Reset left padding for unstyled -ul.unstyled.inline > li, -ol.unstyled.inline > li { - padding-left: 0; + list-style: none; + & > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; + } } // Description Lists -- cgit v1.2.3