I-Tailwind CSS: Uhlaka lwe-Utility-First CSS kanye ne-API yeRidid, Design Responsive

Uhlaka lwe-Tailwind CSS

Ngenkathi ngijule kwezobuchwepheshe nsuku zonke, angitholi isikhathi esiningi ngendlela engingathanda ukwabelana ngayo ngokuhlanganiswa okuyinkimbinkimbi nokuzisebenzisela okwenziwa yinkampani yami kumakhasimende. Futhi, anginaso isikhathi esiningi sokuthola. Iningi lobuchwepheshe engibhala ngabo yizinkampani ezifunayo Martech Zone ukumboza, kepha njalo ngesikhashana - ikakhulukazi nge-Twitter - ngibona ukuzwelana okuthile ngobuchwepheshe obusha engidinga ukuhlanganyela nabo.

Uma usebenza ekwakhiweni kwewebhu, ukuthuthukiswa kohlelo lokusebenza lweselula, noma nje ukusetha uhlelo lokuphathwa kokuqukethwe, kungenzeka ukuthi ulwe nokukhungatheka kwezitayela ezincintisanayo kumashidi wesitayela amaningi. Ngisho namathuluzi wokuthuthukisa amangalisayo akhiwe ngaphakathi kwesiphequluli ngasinye, ukulandelela phansi nokuhlanza i-CSS kungadinga isikhathi esiningi namandla.

Izinhlaka ze-CSS

Eminyakeni yamuva nje, abaklami benze umsebenzi omuhle ngokumangazayo wokukhipha ukuqoqwa kwezitayela ezilungisiwe futhi ezilungele ukusetshenziswa. Lawa ma-Stylesheets e-CSS aziwa kangcono njengama-CSS Frameworks, azama ukwamukela zonke izitayela ezahlukahlukene namandla aphendulayo ukuze abathuthukisi bakwazi nje ukubhekisa uhlaka kunokuba bakhe ifayili le-CSS kusuka ekuqaleni. Ezinye izinhlaka ezidumile yilezi:

  • sokuqalisa - Uhlaka oluguquke ngaphezu kweminyaka eyishumi, olwethulwe okokuqala yi-Twitter. Inikeza izici ezingenakubalwa. Inama-downsides, adinga i-SASS, kunzima ukwedlula ngaphezulu, kuncike ku-JQquery, futhi kuhle kakhulu ukulayisha.
  • thola - uhlaka oluhlanzekile olunobunjiniyela futhi olungenciki kuJavaScript.
  • Foundation - uhlaka olujwayelekile nolusebenzisekayo lweCSS olunamathani wezinto ezenziwe ngokwezifiso kalula. Ngokwengeziwe, kukhona Isisekelo se-imeyili futhi I-Uion Motion ngokugqwayiza.
  • Ikhithi ye-UI - inhlanganisela ye-HTML, iJavaScript, ne-CSS ukwenza ukuthi ukuphela kwakho kuthuthukiswe ngokushesha futhi kalula.

Uhlaka lwe-Tailwind CSS

Ngenkathi ezinye izinhlaka zenza umsebenzi omuhle wokuhlalisa izinto ezithandwayo zomsebenzisi, iTailwind isebenzisa indlela eyaziwa ngokuthi I-Atomic CSS. Ngamafuphi, abakwaTailwind ngobuhlakani bahlela amagama ekilasi besebenzisa ulimi lwemvelo ukwenza lokho abathi bayakwenza. Ngakho-ke, ngenkathi iTailwind ingenawo umtapo wezinto, ikhono lokwakha kalula isikhombimsebenzisi esinamandla, nesiphendulayo ngokukhomba amagama eklasi le-CSS lihle, liyashesha, futhi alinakuqhathaniswa.

Nazi izibonelo ezinhle impela:

AmaGridi weCSS

css ikholomu yokuqala grid amakholomu

Ama-CSS Gradients

ama-css gradients

I-CSS Yokusekelwa Kwemodi Emnyama

css imodi emnyama

I-Tailwind nayo inemnandi isandiso siyatholakala ye-VS Code ukuze ukwazi ukubona nokufaka kalula amakilasi kusuka kusihleli sekhodi seMicrosoft.

Okuhlakaniphe nangaphezulu, i-Tailwind isusa ngokuzenzakalela yonke i-CSS engasetshenziswanga lapho yakhela umkhiqizo, okusho ukuthi inqwaba yakho yokugcina ye-CSS incane kunayo yonke okungenzeka ibe yiyo. Eqinisweni, amaphrojekthi amaningi weTailwind athumela ngaphansi kwe-10kB ye-CSS kwiklayenti.

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.