Ekstend Bootstrap fɔ tek advantej pan stayl ɛn kɔmpɔnɛnt dɛn we de insay, ɛn bak LƐS vɛriɔbul ɛn miksin dɛn.
Bootstrap na LESS na in kɔr, wan dinamik staylshit langwej we wi gud padi, Alexis Sellier , mek . I de mek fɔ divɛlɔp sistem-based CSS fast, izi, ɛn fayn.
Wan pan di wan dɛn we mek Bootstrap rayt wan kwik blɔk post bɔt dis , we dɛn sɔmariz ya:
As ɛkstenshɔn fɔ CSS, LESS inklud vɛriɔbul dɛn, miksin fɔ riyuz snipɛt dɛn fɔ kɔd, ɔpreshɔn fɔ simpul mats, nɛst, ɛn ivin kɔlɔ fɛnshɔn dɛn.
Visit di ɔfishal wɛbsayt na http://lesscss.org/ fɔ lan mɔ.
Bikɔs wi CSS rayt wit Less ɛn yuz vɛriɔbul ɛn miksin, i nid fɔ kɔmpilayt fɔ fayn prodakshɔn implimɛnt. Na dis na aw fɔ du am.
Fɔ fala di instrɔkshɔn dɛn na di prɔjek readme na GitHub fɔ kɔmpilayt via kɔmand layn.
Daunlod di laytst Less.js ɛn put di rod fɔ go de (ɛn Bootstrap) insay di <head>
.
<link rel = "staylshit/lɛs" href = "/pat/to/bɔtstrap.lɛs" > <skript src = "/pat/to/lɛs.js" ></script>
Fɔ kɔmpilayt di .less fayl dɛn bak, jɔs sev dɛn ɛn lod yu pej bak. Less.js de kɔmpilayt dɛn ɛn kip dɛn na lokal stɔrɔj.
Di ɔnofishal Mac ap de wach dairektrɔ dɛn fɔ .less fayl dɛn ɛn kɔmpilayt di kɔd to lokal fayl dɛn afta ɛvri sev we dɛn dɔn sev .less fayl we dɛn wach. If yu want, yu kin chenj di tin dɛn we yu lɛk na di ap fɔ mek yu ebul fɔ smɔl smɔl ɛn us dairektrɔ di fayl dɛn we dɛn dɔn kɔmpilayt kin dɔn insay.
Crunch na wan fayn lukin LESS ɛditɔ ɛn kɔmpayla we dɛn bil pan Adobe Air.
Na di sem man we di ɔnofishal Mac ap mek am, CodeKit na Mac ap we de kɔmpilayt LESS, SASS, Stylus, ɛn CoffeeScript.
Mac, Linux, ɛn Windows ap fɔ drɛg ɛn drɔp kɔmpilayt fɔ LESS fayl dɛn. Plɛs, di sɔs kɔd de na GitHub .
Start ɛni wɛb prɔjek kwik kwik wan bay we yu drɔp di CSS ɛn JS we dɛn dɔn kɔmpilayt ɔ we dɛn dɔn smɔl. Layer pan kɔstɔm stayl dɛn sɛpret fɔ izi ɔpgrɛd ɛn mentenɛns fɔ go bifo.
Daunlod di laytst Bootstrap we dɛn dɔn kɔmpilayt ɛn put am insay yu prɔjek. Fɔ ɛgzampul, yu kin gɛt sɔntin lɛk dis:
ap/ layout dɛn/ . tɛmplat dɛn/ . pɔblik/ css/ fɔ . di bכtstrap.min.css js/ . bootstrap.min.js fɔ di wan dɛn we de wok img/ . glifikɔn dɛn-afling dɛn.png glyphicons-afling dɛn-wayt.png
Kɔpi di bays HTML we de dɔŋ ya fɔ bigin.
- <html> fɔ di wan dɛn we de
- <hɛd>
- <taytul> Bootstrap 101 Template </taytul>
- <!-- Bɔtstrap -->
- <link href = "pɔblik/css/bɔtstrap.min.css" rel = "staylshit" >
- </hɛd>
- <bɔdi>
- <h1> Halo, wɔl! </h1> fɔ di wan dɛn we de
- <!-- Bɔtstrap -->
- <skript src = "pɔblik/js/bɔtstrap.min.js" ></skript>
- </bɔdi>
- </html> fɔ di wan dɛn we de
Wok insay yu kɔstɔm CSS, JS, ɛn mɔ as nid de fɔ mek Bootstrap yu yon wit yu yon sɛpret CSS ɛn JS fayl dɛn.
- <html> fɔ di wan dɛn we de
- <hɛd>
- <taytul> Bootstrap 101 Template </taytul>
- <!-- Bɔtstrap -->
- <link href = "pɔblik/css/bɔtstrap.min.css" rel = "staylshit" >
- <!-- Projɛkt -->
- <link href = "pɔblik/css/aplikeshɔn.css" rel = "staylshit" >
- </hɛd>
- <bɔdi>
- <h1> Halo, wɔl! </h1> fɔ di wan dɛn we de
- <!-- Bɔtstrap -->
- <skript src = "pɔblik/js/bɔtstrap.min.js" ></skript>
- <!-- Projɛkt -->
- <skript src = "pɔblik/js/aplikeshɔn.js" ></script>
- </bɔdi>
- </html> fɔ di wan dɛn we de