From 1f6b957281919e6a46ae747dfd17e450a1f19997 Mon Sep 17 00:00:00 2001 From: Nicolas Hoffmann Date: Mon, 13 May 2013 12:32:48 +0300 Subject: [PATCH 1/9] Proposition : enhancement of tag sub/sup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Proposition helps to avoid bad line-height rendering caused by sub and sup tags. (use these tags on big blocks of texts with and without the fix to see the difference) In french : la proposition aide à éviter des interlignages disgracieux causés par les balises sup et sub. ;) --- css/knacss.css | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/css/knacss.css b/css/knacss.css index 9a77b74..54c921d 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -138,6 +138,18 @@ mark { padding:2px 4px; background: #ff0; } +/* avoid bad line-height */ +sup, +sub { + vertical-align: 0; + position: relative; +} +sup { + bottom: 1ex; +} +sub { + top: .5ex; +} table { margin-bottom: 1.5em; } @@ -534,4 +546,4 @@ textarea { body { -webkit-text-size-adjust: 100%; } -} \ No newline at end of file +} From 8b9dbe78aeaab4f722a23eecd8b483c23a2a160f Mon Sep 17 00:00:00 2001 From: raphaelgoetter Date: Mon, 13 May 2013 18:39:30 +0200 Subject: [PATCH 2/9] sub / sup added --- css/knacss.css | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/css/knacss.css b/css/knacss.css index 54c921d..7e28b00 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -1,5 +1,5 @@ /* -* www.KNACSS.com V2.6e @author: Raphael Goetter, Alsacreations +* www.KNACSS.com V2.6f @author: Raphael Goetter, Alsacreations * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ */ @@ -138,17 +138,16 @@ mark { padding:2px 4px; background: #ff0; } -/* avoid bad line-height */ sup, sub { - vertical-align: 0; - position: relative; + vertical-align: 0; + position: relative; } sup { - bottom: 1ex; + bottom: 1ex; } sub { - top: .5ex; + top: .5ex; } table { margin-bottom: 1.5em; } From bd413a467671fd0787769475d6d30d33fed85e3f Mon Sep 17 00:00:00 2001 From: raphaelgoetter Date: Sun, 19 May 2013 10:48:58 +0200 Subject: [PATCH 3/9] =?UTF-8?q?hyphens=20d=C3=A9plac=C3=A9=20dans=20partie?= =?UTF-8?q?=20Responsive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit les césures ont été déplacées dans la partie Responsive, et les noms "medium" (<768) sont devenus "small" --- css/knacss.css | 15 ++------------- css/rwd.css | 48 +++++++++++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/css/knacss.css b/css/knacss.css index 7e28b00..2ae7052 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -1,5 +1,5 @@ /* -* www.KNACSS.com V2.6f @author: Raphael Goetter, Alsacreations +* www.KNACSS.com V2.6g @author: Raphael Goetter, Alsacreations * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ */ @@ -180,17 +180,6 @@ li ol { img, table, td, blockquote, code, pre, textarea, input, video { max-width: 100%; } - -/* you shall not pass */ -div, textarea, table, td, th, code, pre, samp { - word-wrap: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - -ms-hyphens: auto; - -o-hyphens: auto; - hyphens: auto; -} - /* pictures */ img { height: auto; @@ -545,4 +534,4 @@ textarea { body { -webkit-text-size-adjust: 100%; } -} +} \ No newline at end of file diff --git a/css/rwd.css b/css/rwd.css index d6179cd..4eef669 100644 --- a/css/rwd.css +++ b/css/rwd.css @@ -11,7 +11,7 @@ } /* ---------------------------------- */ -/* ==Responsive large / medium / tiny */ +/* ==Responsive large / small / tiny */ /* ---------------------------------- */ @media (min-width: 1280px) { @@ -72,35 +72,45 @@ .w800p, .w960p, .mw960p, - .medium-wauto { width: auto; } + .small-wauto { width: auto; } - /* layouts for medium (m) screens */ - .medium-hidden, + /* you shall not pass */ + div, textarea, table, td, th, code, pre, samp { + word-wrap: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + -o-hyphens: auto; + hyphens: auto; + } + + /* layouts for small (s) screens */ + .small-hidden, .tablet-hidden { display: none !important; } - .medium-visible { display: block !important; } - .medium-no-float {float: none; } - .medium-inbl { + .small-visible { display: block !important; } + .small-no-float {float: none; } + .small-inbl { display: inline-block; float: none; vertical-align: top; } - .medium-row { + .small-row { display: table !important; table-layout: fixed !important; width: 100% !important; } - .medium-col { + .small-col { display: table-cell !important; vertical-align: top !important; } - /* widths for medium (m) screens */ - .medium-w25 { width: 25% !important; } - .medium-w33 { width: 33.3333% !important; } - .medium-w50 { width: 50% !important; } - .medium-w66 { width: 66.6666% !important; } - .medium-w75 { width: 75% !important; } - .medium-w100 { + /* widths for small (s) screens */ + .small-w25 { width: 25% !important; } + .small-w33 { width: 33.3333% !important; } + .small-w50 { width: 50% !important; } + .small-w66 { width: 66.6666% !important; } + .small-w75 { width: 75% !important; } + .small-w100 { display: block !important; float: none !important; clear: none !important; @@ -109,9 +119,9 @@ margin-right: 0 !important; border: 0; } - /* margins for medium (m) screens */ - .medium-ma0, - .medium-man { margin: 0 !important; } + /* margins for small (s) screens */ + .small-ma0, + .small-man { margin: 0 !important; } /* Responsive grids */ .grid4 > * {width: 49% !important; } From f81fd13e8f72461844b8c33af1387acfc72df0b9 Mon Sep 17 00:00:00 2001 From: raphaelgoetter Date: Mon, 27 May 2013 18:43:25 +0200 Subject: [PATCH 4/9] ajout de classe pour largeur 1140px --- css/knacss.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/css/knacss.css b/css/knacss.css index 2ae7052..44b6555 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -1,5 +1,5 @@ /* -* www.KNACSS.com V2.6g @author: Raphael Goetter, Alsacreations +* www.KNACSS.com V2.6h @author: Raphael Goetter, Alsacreations * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ */ @@ -372,6 +372,8 @@ img.left, img.right { .w800p { width: 800px; } .w960p { width: 960px; } .mw960p { max-width: 960px; } +.w1140p { width: 1140px; } +.mw1140p { max-width: 1140px; } /* spacing helpers p,m = padding,margin From 77e0dbdb0bc90295ef8136267a2d4cfd684bc818 Mon Sep 17 00:00:00 2001 From: raphaelgoetter Date: Mon, 27 May 2013 18:52:41 +0200 Subject: [PATCH 5/9] ajout de @viewport dans rwd.css --- css/rwd.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/css/rwd.css b/css/rwd.css index 4eef669..1395f57 100644 --- a/css/rwd.css +++ b/css/rwd.css @@ -1,4 +1,28 @@ +/* ----------------------------- */ +/* ==viewport fixing for RWD */ +/* ----------------------------- */ +@-webkit-viewport { + width: device-width; + zoom: 1.0; +} +@-moz-viewport { + width: device-width; + zoom: 1.0; +} +@-ms-viewport { + width: device-width; + zoom: 1.0; +} +@-o-viewport { + width: device-width; + zoom: 1.0; +} +@viewport { + width: device-width; + zoom: 1.0; +} + /* ----------------------------- */ /* ==desktop and retina medias */ /* ----------------------------- */ From 12ae326e17fcd6637f26984cddd5ce5f261115a3 Mon Sep 17 00:00:00 2001 From: raphaelgoetter Date: Tue, 25 Jun 2013 19:40:54 +0200 Subject: [PATCH 6/9] suppression de quelques !important inutiles --- css/knacss.css | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/css/knacss.css b/css/knacss.css index 44b6555..4df7b64 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -1,5 +1,5 @@ /* -* www.KNACSS.com V2.6h @author: Raphael Goetter, Alsacreations +* www.KNACSS.com V2.6i @author: Raphael Goetter, Alsacreations * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ */ @@ -381,27 +381,27 @@ a,t,r,b,l = all,top,right,bottom,left s,m,l,n,0 = small(10px),medium(20px),large(30px), zero or none(0) source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css */ -.m-reset, .ma0 { margin: 0 !important; } -.p-reset, .pa0 { padding: 0 !important; } -.ma1, .mas { margin: 10px !important; } -.ma2, .mam { margin: 20px !important; } -.ma3, .mal { margin: 30px !important; } +.m-reset, .ma0 { margin: 0; } +.p-reset, .pa0 { padding: 0; } +.ma1, .mas { margin: 10px; } +.ma2, .mam { margin: 20px; } +.ma3, .mal { margin: 30px; } .pa1, .pas { padding: 10px; } .pa2, .pam { padding: 20px; } .pa3, .pal { padding: 30px; } -.mt0, .mtn { margin-top: 0 !important; } -.mt1, .mts { margin-top: 10px !important; } -.mt2, .mtm { margin-top: 20px !important; } -.mt3, .mtl { margin-top: 30px !important; } +.mt0, .mtn { margin-top: 0; } +.mt1, .mts { margin-top: 10px; } +.mt2, .mtm { margin-top: 20px; } +.mt3, .mtl { margin-top: 30px; } .mr0, .mrn { margin-right: 0; } .mr1, .mrs { margin-right: 10px; } .mr2, .mrm { margin-right: 20px; } .mr3, .mrl { margin-right: 30px; } -.mb0, .mbn { margin-bottom: 0 !important; } -.mb1, .mbs { margin-bottom: 10px !important; } -.mb2, .mbm { margin-bottom: 20px !important; } -.mb3, .mbl { margin-bottom: 30px !important; } +.mb0, .mbn { margin-bottom: 0; } +.mb1, .mbs { margin-bottom: 10px; } +.mb2, .mbm { margin-bottom: 20px; } +.mb3, .mbl { margin-bottom: 30px; } .ml0, .mln { margin-left: 0; } .ml1, .mls { margin-left: 10px; } .ml2, .mlm { margin-left: 20px; } From 5b7158d7e7527f6d9beafa2ef121281f887e8e8a Mon Sep 17 00:00:00 2001 From: Raphael Goetter Date: Tue, 25 Jun 2013 19:43:19 +0200 Subject: [PATCH 7/9] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 031b4c0..514cc0f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ There is nothing to install. It is only a CSS file you can call as usual in the + +... Or you can also the KNACSS Builder : http://knacss.com/builder/ + Usage ----- KNACSS is a collection of ready to use styles and snippets to kick start your project. Feel free to use it as a “reset”, then make it grow to suit your needs. From 87997b3f16394a84da44e7b7df16a63e98fde76f Mon Sep 17 00:00:00 2001 From: Raphael Goetter Date: Wed, 3 Jul 2013 20:54:06 +0200 Subject: [PATCH 8/9] suppression de margin-right: -.25em sur les .inbl --- css/knacss.css | 1 - 1 file changed, 1 deletion(-) diff --git a/css/knacss.css b/css/knacss.css index 4df7b64..24cda90 100644 --- a/css/knacss.css +++ b/css/knacss.css @@ -259,7 +259,6 @@ body > script {display: none !important;} .inbl { display: inline-block; vertical-align: top; - margin-right: -.25em; } /* flexbox layout */ From fec7b4dc18612fb6f08ee4ab8cd99ccf5e69edc3 Mon Sep 17 00:00:00 2001 From: Raphael Goetter Date: Sun, 7 Jul 2013 18:56:43 +0200 Subject: [PATCH 9/9] =?UTF-8?q?mise=20=C3=A0=20jour=20de=20la=20version=20?= =?UTF-8?q?LESS=20(flag=20Strict=20Maths)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- less/knacss.less | 74 ++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/less/knacss.less b/less/knacss.less index d4e1c97..d2f2f20 100644 --- a/less/knacss.less +++ b/less/knacss.less @@ -1,5 +1,5 @@ /* -* www.KNACSS.com V2.6d @author: Raphael Goetter, Alsacreations +* www.KNACSS.com V2.6i @author: Raphael Goetter, Alsacreations * Licence CC-BY http://creativecommons.org/licenses/by/3.0/fr/ */ @@ -15,18 +15,19 @@ @gutter : 1.5%; // gutter value (%) for grid layouts // LESS functions : don't touch ;) -.pxtoem (@fontsize) {font-size: (@fontsize / @basefont) + 0em;} -.line (@fontsize) {line-height: @l-h *2 / (@fontsize / @basefont) + 0em} -.mtop (@fontsize) {margin: @l-h / (@fontsize / @basefont) + 0em 0 0} -.grid (@number) {width: (100%-(@gutter*(@number - 1))) / @number;} +.pxtoem (@fontsize) {font-size: ((@fontsize / @basefont) + 0em);} +.line (@fontsize) {line-height: (@l-h *2 / (@fontsize / @basefont) + 0em)} +.mtop (@fontsize) {margin: (@l-h / (@fontsize / @basefont) + 0em) 0 0} +.grid (@number) {width: ((100%-(@gutter*(@number - 1))) / @number);} + .flow(@font-size, @base-font: @basefont, @base-height: @l-h) { - @coef: ceil(1 / (@base-height * @base-font / @font-size)); - @size: (@font-size / @base-font) + 0em; - @height: (@base-font * @base-height / @font-size) + 0em; - font-size: @size; - line-height: @height * @coef; - margin-top: @height; - margin-bottom: 0; + @coef: ceil((1 / (@base-height * @base-font / @font-size))); + @size: ((@font-size / @base-font) + 0em); + @height: ((@base-font * @base-height / @font-size) + 0em); + font-size: @size; + line-height: (@height * @coef); + margin-top: @height; + margin-bottom: 0; } @@ -42,7 +43,7 @@ body { background-color: #fff; color: #000; font-family: "Century Gothic", helvetica, arial, sans-serif; - font-size: (@basefont / 10) + 0em; + font-size: ((@basefont / 10) + 0em); line-height: @l-h; // adapt to your design } @@ -176,16 +177,6 @@ img, table, td, blockquote, code, pre, textarea, input, video { max-width: 100%; } -/* you shall not pass */ -div, textarea, table, td, th, code, pre, samp { - word-wrap: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - -ms-hyphens: auto; - -o-hyphens: auto; - hyphens: auto; -} - /* pictures */ img { height: auto; @@ -267,7 +258,6 @@ body > script {display: none !important;} .inbl { display: inline-block; vertical-align: top; - margin-right: -.25em; } /* flexbox layout */ @@ -426,27 +416,27 @@ a,t,r,b,l = all,top,right,bottom,left s,m,l,n = small(10px),medium(20px),large(30px),none(0) source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css */ -.m-reset, .ma0 { margin: 0 !important; } -.p-reset, .pa0 { padding: 0 !important; } -.ma1, .mas { margin: @smallvalue !important; } -.ma2, .mam { margin: @mediumvalue !important; } -.ma3, .mal { margin: @largevalue !important; } +.m-reset, .ma0 { margin: 0; } +.p-reset, .pa0 { padding: 0; } +.ma1, .mas { margin: @smallvalue; } +.ma2, .mam { margin: @mediumvalue; } +.ma3, .mal { margin: @largevalue; } .pa1, .pas { padding: @smallvalue; } .pa2, .pam { padding: @mediumvalue; } .pa3, .pal { padding: @largevalue; } -.mt0, .mtn { margin-top: 0 !important; } -.mt1, .mts { margin-top: @smallvalue !important; } -.mt2, .mtm { margin-top: @mediumvalue !important; } -.mt3, .mtl { margin-top: @largevalue !important; } +.mt0, .mtn { margin-top: 0; } +.mt1, .mts { margin-top: @smallvalue; } +.mt2, .mtm { margin-top: @mediumvalue; } +.mt3, .mtl { margin-top: @largevalue; } .mr0, .mrn { margin-right: 0; } .mr1, .mrs { margin-right: @smallvalue; } .mr2, .mrm { margin-right: @mediumvalue; } .mr3, .mrl { margin-right: @largevalue; } -.mb0, .mbn { margin-bottom: 0 !important; } -.mb1, .mbs { margin-bottom: @smallvalue !important; } -.mb2, .mbm { margin-bottom: @mediumvalue !important; } -.mb3, .mbl { margin-bottom: @largevalue !important; } +.mb0, .mbn { margin-bottom: 0; } +.mb1, .mbs { margin-bottom: @smallvalue; } +.mb2, .mbm { margin-bottom: @mediumvalue; } +.mb3, .mbl { margin-bottom: @largevalue; } .ml0, .mln { margin-left: 0; } .ml1, .mls { margin-left: @smallvalue; } .ml2, .mlm { margin-left: @mediumvalue; } @@ -673,6 +663,16 @@ textarea { vertical-align: top !important; } + /* you shall not pass */ + div, textarea, table, td, th, code, pre, samp { + word-wrap: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + -ms-hyphens: auto; + -o-hyphens: auto; + hyphens: auto; + } + /* widths for medium (m) screens */ .medium-w25 { width: 25% !important; } .medium-w33 { width: 33.3333% !important; }