From 330f6adb0c7d59047ce6e039940c2cdb2457037b Mon Sep 17 00:00:00 2001 From: Raphael Goetter Date: Fri, 22 Nov 2013 17:35:03 +0100 Subject: [PATCH] more variables in config.less --- less/_00-config.less | 20 ++++++++++++------- less/_01-base.less | 46 ++++++++++++++++++++++++++++++++----------- less/knackLESS.zip | Bin 8956 -> 9128 bytes 3 files changed, 47 insertions(+), 19 deletions(-) diff --git a/less/_00-config.less b/less/_00-config.less index e1925e3..79f1f5c 100644 --- a/less/_00-config.less +++ b/less/_00-config.less @@ -3,6 +3,12 @@ // LESS values : adapt them to your design @basefont : 14px; // if "14px" then 1em = 14px @lh : 1.5; // equiv line-height 1.5em +@h1-size : 32px; // equiv "32px" +@h2-size : 28px; // equiv "28px" +@h3-size : 24px; // equiv "24px" +@h4-size : 20px; // equiv "20px" +@h5-size : 18px; // equiv "18px" +@h6-size : 16px; // equiv "16px" @basecolor : #000; // text color on body @basebg : #fff; // body background color @basecolor-link : #333; // primary links color; @@ -14,26 +20,26 @@ @smallscreen : 768px; // small screens media query @largescreen : 1280px; // large screens media query @gutter : 20px; // gutter value (%, px, em, rem, etc) for grid layouts -@fontstack1 : helvetica, arial, sans-serif; // common font -@fontstack2 : consolas, 'DejaVu Sans Mono', courier, monospace; // monospace font +@fontstack1 : Helvetica, Arial, sans-serif; // common font +@fontstack2 : Consolas, 'DejaVu Sans Mono', Courier, monospace; // monospace font @fontstack3 : FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif; // universal stack // LESS mixins : don't touch or you'll be banned ;) // px to em/rem .rem(@size, @bf: @basefont){ - @em: round((@size / @bf),4); - font-size: unit(@em, em); @rem: round((@size / 10),4); font-size: unit(@rem, rem); } +.em(@size, @bf: @basefont){ + @em: round((@size / @bf),4); + font-size: unit(@em, em); +} // flow for headings .flow(@size, @bf: @basefont, @bh: @lh) { @marg: @bh * @bf / @size; - @mt: unit(round(@marg,4),em); + @mt: unit(@marg,em); margin-top: @mt; margin-bottom: 0; - @em: round((@size / @bf),4); - font-size: unit(@em, em); @rem: round((@size / 10),4); font-size: unit(@rem, rem); @coef: ceil(1/@mt); diff --git a/less/_01-base.less b/less/_01-base.less index e2fba25..2e554ab 100644 --- a/less/_01-base.less +++ b/less/_01-base.less @@ -36,39 +36,39 @@ hgroup { line-height: @lh; } h1, .h1-like { - .flow(32px); // equiv 32px + .flow(@h1-size); } h2, .h2-like { - .flow(28px); // equiv 28px + .flow(@h2-size); } h3, .h3-like { - .flow(24px); // equiv 24px + .flow(@h3-size); } h4, .h4-like { - .flow(20px); // equiv 20px + .flow(@h4-size); } h5, .h5-like { - .flow(18px); // equiv 18px + .flow(@h5-size); } h6, .h6-like { - .flow(16px); // equiv 16px + .flow(@h6-size); } /* alternate font-sizing */ .smaller { - .rem (10px); /* equiv 10px */ + .em(@basefont - 4); } .small { - .rem (12px); /* equiv 12px */ + .em(@basefont - 2); } .big { - .rem (16px); /* equiv 16px */ + .em(@basefont + 2); } .bigger { - .rem (18px); /* equiv 18px */ + .em(@basefont + 4); } .biggest { - .rem (20px); /* equiv 20px */ + .em(@basefont + 6); } /* soft reset */ @@ -90,7 +90,7 @@ samp, kbd { white-space: pre-wrap; font-family: @fontstack2; - line-height: 1em; + line-height: 1; } code, kbd, mark { border-radius: 2px; @@ -360,6 +360,28 @@ source https://github.com/stubbornella/oocss/blob/master/core/spacing/space.css /* ==iefix */ /* ----------------------------- */ +/* Make sure you are using Conditional Classes in your HTML */ +/* see : http://www.alsacreations.com/astuce/lire/988-classes-conditionnelles-HTML.html */ + +.ie678 h1, .ie678 .h1-like { + .em(@h1-size); +} +.ie678 h2, .ie678 .h2-like { + .em(@h2-size); +} +.ie678 h3, .ie678 .h3-like { + .em(@h3-size); +} +.ie678 h4, .ie678 .h4-like { + .em(@h4-size); +} +.ie678 h5, .ie678 .h5-like { + .em(@h5-size); +} +.ie678 h6, .ie678 .h6-like { + .em(@h6-size); +} + /* haslayout for IE6/IE7 */ .ie67 .clearfix, .ie67 .line, diff --git a/less/knackLESS.zip b/less/knackLESS.zip index 4f494efcd8b095ade7d4597a47d78fb8af76df5b..0d972608b037394cafc7254086d049a6dfa352a6 100644 GIT binary patch delta 3836 zcmVN0MW{!AP)h>@6aWAK2mlzTbwgxw*)H}1001Hf000jF003VwFfC(mZf0p` zE^K9UbEQ>FkJ>O0K7+)67_q7#Rd@tgia?d9`cMz;X{FwsWRkd>*sSePXx0DTv7M~4 zEbSi30c6kjee>|lFq^@9DKefz#!G}P9GT)QE>VY2@e>z+^gEqS2mL{RHiIu8@9qdu z)~E@}Qg$$43ar3LILlf=ikjzQ(BH>QVTuct3GfVt_As}EcnJD9iX32f7WGzz9>Pkd&ce=Wm3o^s%}&* z%^5JAWiqKXrk66hVrA)ir%Apoqcixff{aolv7GvU4oI1$DHpjWc7-XgtCrq*1aEkW zUeYCYoG)9tGrYt$T%2{H5QS&2HZ9#+z?-xSg~3CO>fGl0$lAi2_2x;!*I6!}4l7!0 zo`!mzmeRmLbziqM`zY5`S3IVGSl>I`J1TN=Xae6IA18i)zc5Jnw)``5_XDp9s zc)~(|ct^XT3_&xYCmI#^y_U$TqJFfzE`8zYv|h9<8SRnL2mH>y)o@32_$q}Qg=DQ2 zM@7qq&icR-^sm~Uo~bUq>L;p#)p0RZGKAp=B`FPiHw<5nxfYzdRWo`AtJ>Xfe(lkI zOQjgmev@@l0F{aAGop8kk>*MWYVcj)NQaYuU4K~3sH!mNPw8j8w?iJnKF+rAxC?_{ zgMM#M<}J9P9D5k`S~L&BRX|hHvpBaQwl+jF-mB)lto1jk|6BZuHo^WX?%JT0rc|<0 z{%|c(AZwa`YVWSQwC94(Wf6e$ZimO(3wUjz*16^FoXxaOEh_Y0dw$#|MjnV)na)*z zERB(r4egl!tXglMNTj$EP-TX+!cfId{1KTt~p1QY-O00;or zi*`d_;gKB*3jhFPApigk0001AFflD+VRL0JY-MwEty*nw<2DlhoB;U`ye)c2w(?8t z*vUHBV%wta6}aL)^u8VL10^vw8%ktYU#<$!B>iXyf{DWtnAo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