Beginning css preprocessors



Download 2,42 Mb.
Pdf ko'rish
bet52/59
Sana01.01.2022
Hajmi2,42 Mb.
#285229
1   ...   48   49   50   51   52   53   54   55   ...   59
Bog'liq
Beginning CSS Preprocessors

Listing 3-49.  Example Using round

$fontsize:1.1em;

.container{

  // Will use 1em

  font-size:round($fontsize);

}



Chapter 3 

 advanCed SaSS



53

Color Functions

Sass provided various functions for transforming the colors, such as adjust_color, complement, greyscale, 

invert, etc.

Some of these are described in the following sections.

adjust_color($color,…)

This function is used to assign individual properties of colors such as red, green, blue, etc. The properties  

are specified as keyword arguments and values are added or subtracted from the original value (see  

Listing 

3-50


). The following properties of the color can be transformed using this function:

•  Red


•  Green

•  Blue


•  Hue

•  Lightness

•  Alpha 

Listing 3-50.  Example Showing adjust_color

$fontcolor:#900;

.container{

  color:adjust_color($fontcolor,$red:-5);

}

complement($color)



This function returns the complement of the color, as shown in Listing 

3-51


.

Listing 3-51.  Example Showing complement

$fontcolor:#FF0000;

.container{

  color:complement($fontcolor);

}

The output of the previous code snippet is shown in Listing 



3-52

.


Download 2,42 Mb.

Do'stlaringiz bilan baham:
1   ...   48   49   50   51   52   53   54   55   ...   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