Beginning css preprocessors



Download 2,42 Mb.
Pdf ko'rish
bet14/59
Sana01.01.2022
Hajmi2,42 Mb.
#285229
1   ...   10   11   12   13   14   15   16   17   ...   59
Bog'liq
Beginning CSS Preprocessors

Listing 1-13.  Example Showing Implementation of Variables Using SASS

$text-color:#333;

body {


        color:$text-color;

}

When this code is compiled, it takes the variable defined for the $text-color and outputs normal CSS 



with the variable’s values placed in the CSS. This can be useful when working with properties applicable 

sitewide and keeping them consistent throughout the site.



Listing 1-14.  Output of Previous Code Snippet

body {


        color:#333;

}

Similarly in Less CSS @ symbol is used to declare a variable.



Listing 1-15.  Example Showing Implementation of Variables Using Less

@text-color:#333;

body{

        color:$text-color;



}

Nesting


Visual hierarchy of a page is not as clear in CSS as it is in HTML. Preprocessors let you nest CSS selectors

similar to the way it is done in HTML.




Download 2,42 Mb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   ...   59




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish