Beginning css preprocessors



Download 2,42 Mb.
Pdf ko'rish
bet46/59
Sana01.01.2022
Hajmi2,42 Mb.
#285229
1   ...   42   43   44   45   46   47   48   49   ...   59
Bog'liq
Beginning CSS Preprocessors

Listing 3-35.  CSS Selectors Within a Mixin

@mixin importantInfo {

  font-weight:strong;

  li {

    margin: 0px 5px;



  }

}

 



.notfication{

  border-radius:35%;

  @include importantInfo;

}

This example creates a mixin named importantInfo, which contains its own style rule plus the CSS 



selector li with its own rule. This is included in the notification class. The result of this code is shown in 

Listing 


3-36

.

Listing 3-36.  Output of Listing 

3-35

.notfication {



  border-radius: 35%;

  font-weight:strong;

}

 

.notfication li {



  margin: 0px 5px;

}

Arguments to Mixins



Mixins in Sass can accept arguments that are provided while calling that mixin. This helps the mixin provide 

different behaviors, depending on arguments provided and thus make it useful for a wide range of scenarios.

Arguments are passed as comma-separated lists of variables, inside parentheses, after the name of the 

mixin. This is demonstrated in Listing 

3-37

.



Chapter 3 

 advanCed SaSS



49


Download 2,42 Mb.

Do'stlaringiz bilan baham:
1   ...   42   43   44   45   46   47   48   49   ...   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