SASS lub moj khaum yog dab tsi?
SASS lub moj khaum yog dab tsi?

Video: SASS lub moj khaum yog dab tsi?

Video: SASS lub moj khaum yog dab tsi?
Video: Neeg Plhom Moj Thiaj Tau Kev Tws /13/5/2022/ 2024, Kaum ib hlis
Anonim

Sass yog qhov txuas ntxiv ntawm CSS3, ntxiv cov kev cai nested, variables, mixins, selector qub txeeg qub tes, thiab ntau dua. Nws tau muab txhais ua qauv zoo, qauv CSS siv cov cuab yeej kab hais kom ua lossis lub vev xaib- lub moj khaum plugin. Yog li Sass yog ib txoj hauv kev zoo rau kev sau ntawv ntau dua thiab ua haujlwm ntawm kev sau CSS.

Tsis tas li ntawd, SASS yog dab tsi thiab nws ua haujlwm li cas?

Sass ua haujlwm los ntawm kev sau koj cov style hauv. scss (los yog. sass ) cov ntaub ntawv, uas yuav tau muab tso ua ke rau hauv cov ntaub ntawv CSS tsis tu ncua. Cov ntaub ntawv CSS tshiab tau muab tso ua ke yog dab tsi tau thauj mus rau koj tus browser kom style koj daim ntawv thov web. Qhov no tso cai rau tus browser kom siv cov qauv zoo rau koj nplooj ntawv web.

Ib sab saum toj, dab tsi yog daim ntawv sass? A SASS file yog Syntactically Awesome StyleSheets ntaub ntawv . Nws muaj Sass syntax, uas yog ib qho kev txuas ntxiv ntawm cascading style nplooj ntawv (CSS) siv los tsim cov layout ntawm nplooj ntawv web. Hloov chaw, SASS cov ntaub ntawv tuaj yeem muab tso ua ke rau hauv CSS cov ntaub ntawv uas yog siv los format cov ntsiab lus ntawm nplooj ntawv web.

Hauv qhov no, Sass siv rau dab tsi?

Sass (uas sawv cev rau 'Syntactically txaus nyiam cov nplooj ntawv) yog qhov txuas ntxiv ntawm CSS uas ua rau koj ua tau siv yam xws li kev sib txawv, kev cai nested, inline imports thiab lwm yam. Nws kuj tseem pab kom cov khoom sib koom ua ke thiab tso cai rau koj los tsim cov nplooj ntawv style sai dua. Sass yog sib xws nrog tag nrho cov versions ntawm CSS.

Sass txawv ntawm CSS li cas?

FAQ: Sass vs SCSS Lawv yeej yog ob leeg Sass nrog a txawv syntax. SCSS Nws yog ib tug tshiab version, Sass Version 3. Raws li peb pom, SCSS (Sassy CSS ) muaj a CSS -zoo li syntax, uas nyeem tau yooj yim dua. Nws yog ib tug extension ntawm CSS , hos Sass muaj ntau txawv syntax.

Pom zoo: