Beginning css preprocessors



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

Listing 3-43.  Example of Content Block

@mixin fancyBorder($borderColor:#000, $borderWidth:2px,$fontProp…) {

  border: {

    color: $borderColor;

    width: $borderWidth;

    style: dashed;

  }

  font:$fontProp;



  @content;

}

 



.specialNote{

  @include fancyBorder(#00F, 1px,1px arial,sans-serif){

    line-height:0.8em;

  }


}


Chapter 3 

 advanCed SaSS



51

The output of this snippet is shown in Listing 

3-44

.

Listing 3-44.  Output of Listing 



3-43

.specialNote {

  border-color: #00F;

  border-width: 1px;

  border-style: dashed;

  font: 1px arial, sans-serif;

  line-height: 0.8em;

}

Function Directives



Functions in Sass perform specified operations on the provided arguments. The syntax of these functions is 

similar to CSS functions like rgb(). Unlike CSS functions, Sass functions can have keyword arguments and 

return values useful for Sass operations.

Sass provides built-in functions that are designed to be widely useful in many different circumstances

like color manipulation, and so on. In addition to that, Sass allows users to define their own functions, 

similar to defining mixins.

Some of the built-in functions provided by Sass are categorized as follows:

 Numeric functions

•  Color functions

 List functions

Numeric Functions

Sass provides a few functions for dealing with numeric values, especially for situations that come up 

frequently when writing stylesheets with Sass.

Some of these are discussed in the following sections.

abs($number)

This function will return an absolute value of the number, as shown in Listing 

3-45

.


Download 2,42 Mb.

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