Bootstrap ka janya

Bootstrap janya walasa ka nafa sɔrɔ cogoyaw ni yɔrɔw la minnu bɛ a kɔnɔ, ani LESS fɛn caman sɛgɛsɛgɛli ani mixins.

Kungolow bɛ wuli! Nin docs ye v2.3.2 ta ye, min tɛ dɛmɛn tugun foroba la. Aw ye Bootstrap ka version laban lajɛ!
CSS ka dɔgɔ

Bootstrap dilannen don ni LESS ye a kɔnɔ, n’o ye kan ye min bɛ se ka kɛ cogoya la, n’o ye an teri ɲuman ye, n’o ye Alexis Sellier ye . A bɛ CSS min sinsinnen bɛ sistɛmuw kan, o yiriwali teliya, ka nɔgɔya, ani ka diya.

Mun na LESS?

Bootstrap dabɔbaa dɔ ye bulɔgu sɛbɛn teliyalen dɔ sɛbɛn nin ko in kan , a kuncɛlen don yan:

  • Bootstrap bɛ compile teliya ~6x teliya la ni Less ye ni i ye a suma ni Sass ye
  • Less bɛ sɛbɛn JavaScript kɔnɔ, o b’a to an bɛ nɔgɔya ka dive in ani patch kɛ ni i y’a suma ni Ruby ni Sass ye.
  • Dɔgɔya ye caman ye; an b'a fɛ k'a ye ko an bɛ CSS sɛbɛn ani ka Bootstrap kɛ fɛn ye min bɛ se ka gɛrɛ bɛɛ la.

Mun de bɛ o la?

I n’a fɔ CSS ka farankan, LESS bɛ fɛn caman sɛmɛntiya, mixins minnu bɛ se ka baara kɛ kokura ni kodew ye, baarakɛcogo minnu bɛ kɛ jatebɔ nɔgɔmanw kama, nesting, ani hali kulɛri baarakɛcogo.

Aw ye kunnafoni wɛrɛw sɔrɔ

Aw ye taa siti ofisiyali la http://lesscss.org/ walasa ka kunnafoni wɛrɛw sɔrɔ.

Komin an ka CSS sɛbɛnnen dòn ni Less ye wa a bɛ baara Kɛ ni fɛn caman ɲɔgɔnna ni mixins ye, a ka kan ka Lajɛ walasa ka labanko waleyali Kɛ. A cogo filɛ nin ye.

Kɔlɔsili: N’i bɛ samali ɲinini dɔ ci GitHub ma ni CSS sɛmɛntiyalen ye, i ka kan ka CSS lajɛ kokura nin fɛɛrɛ ninnu dɔ la kelen fɛ.

Baarakɛminɛn minnu bɛ kɛ ka fɛnw lajɛ ɲɔgɔn fɛ

Cikan sɛrɛkili

Aw bɛ cikanw labato porozɛ readme kɔnɔ GitHub kan walasa ka daɲɛw lajɛ cikan sira fɛ.

JavaScript ye

Less.js labanw telesarse ani ka sira don a la (ani Bootstrap) <head>.

<link rel = "stylesheet/less" href = "/sira/ka taa/bootstrap.less" > <script src = "/sira/ka taa/ka dɔgɔ.js" </script>  
 

Walasa ka .less filew lajɛ kokura, i k’u mara dɔrɔn k’i ka ɲɛ in doni kokura. Less.js b’u Lajɛ k’u mara sigida marayɔrɔ la.

Mac app min tɛ ofisi ye

Mac app min tɛ ofisi ye, o bɛ .less filew ka ɲɛbilasɛbɛnw lajɛ ani ka kode lajɛ ka kɛ sigida filew ye .less file kɔlɔsilen maralen kɔfɛ. N’i ​​b’a fɛ, i bɛ se ka fɛɛrɛw tigɛli kɛ appli kɔnɔ walasa ka automatique minifying ani directory min kɔnɔ, files compilés bɛ laban ka kɛ.

Application wɛrɛw

Crunch (kɛrɛnkɛrɛnnenya la).

Crunch ye LESS editor ani compiler ye min ɲɛ ka ɲi kosɛbɛ min jɔlen bɛ Adobe Air kan.

KodeKit ye

A dabɔra cɛ kelen fɛ ni Mac app min tɛ ofisi ye, CodeKit ye ​​Mac app ye min bɛ LESS, SASS, Stylus, ani CoffeeScript lajɛ.

Simple tɛ min na

Mac, Linux ani Windows app min bɛ kɛ ka LESS filew lajɛ ani ka u fili. Ka fara o kan, source code bɛ GitHub kan .

Teliya la, i bɛ ɛntɛrinɛti porozɛ o porozɛ daminɛ ni CSS ni JS minnu lajɛlen don walima minnu dɔgɔyara, olu bilali ye. Layer kan custom styles danfaralen walasa ka upgrades nɔgɔya ani maintenance ka taa ɲɛ.

Setup file sigicogo

Bootstrap min labɛnna kura ye, o telesarse ka bila i ka poroze kɔnɔ. Misali la, i bɛ se ka fɛn dɔ sɔrɔ i n’a fɔ nin:

  app/
      layidu talenw/ .
      misaliw/ .
  foroba/
      css/ ye.
          bootstrap.min.css ye
      js/ ye.
          bootstrap.min.js ka baarakɛminɛnw
      img/ ye.
          glyphicons-tiɲɛninw.png
          glyphicons-halflings-finmanw.png

Baara kɛ ni daminɛcogo misali ye

Aw bɛ nin basigi HTML in kopi kɛ walasa ka baara daminɛ.

  1. <html>
  2. <kunkolo>
  3. <title> Bootstrap 101 Ɲɛjirali </title>
  4. <!-- Bootstrap ye --> ye
  5. <link href = "jama/css/bootstrap.min.css" rel = "cogo sɛbɛn" >
  6. </head> ye
  7. <farikolo>
  8. <h1> Bonjour , diɲɛ ! </h1> ye
  9. <!-- Bootstrap ye --> ye
  10. <script src = "jama/js/bootstrap.min.js" </script>
  11. </farikolo>
  12. </html>

Layer kan kode ladamu

Baara kɛ i ka ladamu CSS, JS ani fɛn wɛrɛw la i n’a fɔ a mago bɛ cogo min na walasa ka Bootstrap kɛ i yɛrɛ ta ye ni i yɛrɛ ka CSS ni JS filew danfaralenw ye.

  1. <html>
  2. <kunkolo>
  3. <title> Bootstrap 101 Ɲɛjirali </title>
  4. <!-- Bootstrap ye --> ye
  5. <link href = "jama/css/bootstrap.min.css" rel = "cogo sɛbɛn" >
  6. <!-- Porozɛ -->
  7. <link href = "jama/css/application.css" rel = "cogo sɛbɛn" >
  8. </head> ye
  9. <farikolo>
  10. <h1> Bonjour , diɲɛ ! </h1> ye
  11. <!-- Bootstrap ye --> ye
  12. <script src = "jama/js/bootstrap.min.js" </script>
  13. <!-- Porozɛ -->
  14. <script src = "jama/js/application.js" </script>
  15. </farikolo>
  16. </html>