Está en la página 1de 3

SASS Preprocessor

Informacintomadade:http://sasslang.com/
Latestversionatthemomentofwriting:3.4.2

CSSpreprocessorstakecodewritteninthepreprocessedlanguageandthenconvertthatcode
intothesameoldcsswevebeenwritingforyears.

SassboastsmorefeaturesandabilitiesthananyotherCSSextensionlanguageoutthere.The
SassCoreTeamhasworkedendlesslytonotonlykeepup,butstayahead.Sasshasbeen
activelysupportedforalmost8yearsbyitslovingCoreTeam.
ThereareendlessnumberofframeworksbuiltwithSass.Compass,Bourbon,andSusyjustto
nameafew.
SassiscompletelycompatiblewithallversionsofCSS.Wetakethiscompatibilityseriously,so
thatyoucanseamlesslyuseanyavailableCSSlibraries.
Features
Variables
Nesting
Partials
Import
Mixins
Inheritance
Operators

Variables
Thinkofvariablesasawaytostoreinformationthatyouwanttoreusethroughoutyour
stylesheet.Youcanstorethingslikecolors,fontstacks,oranyCSSvalueyouthinkyou'llwantto
reuse.Sassusesthe$symboltomakesomethingavariable.

DocumentocreadoporFranciscoQuintero

Partials
YoucancreatepartialSassfilesthatcontainlittlesnippetsofCSSthatyoucanincludeinother
Sassfiles.ThisisagreatwaytomodularizeyourCSSandhelpkeepthingseasiertomaintain.
ApartialissimplyaSassfilenamedwithaleadingunderscore.Youmightnameitsomething
like_partial.scss.TheunderscoreletsSassknowthatthefileisonlyapartialfileandthatit
shouldnotbegeneratedintoaCSSfile.Sasspartialsareusedwiththe@importdirective.

Mixins
SomethingsinCSSareabittedioustowrite,especiallywithCSS3andthemanyvendor
prefixesthatexist.AmixinletsyoumakegroupsofCSSdeclarationsthatyouwanttoreuse
throughoutyoursite.Youcanevenpassinvaluestomakeyourmixinmoreflexible.Agooduse
ofamixinisforvendorprefixes.

Operators
DoingmathinyourCSSisveryhelpful.Sasshasahandfulofstandardmathoperatorslike+,,
*,/,and%.
DocumentocreadoporFranciscoQuintero

Possible Issues using a CSS Preprocessor

ThoughtbyAmberWeinbergonherarticleaboutpossibleissuesusingaCSSpreprocessor
Someofthefeatures,likemixinsandoperatorsactuallymadethecodealotmoreconvoluted
anjumbled,andseemedtotakealotmorecodethanifyouwerejusttotypeitoutcorrectlyin
thefirstplace.IalsodontseethepointofoperatorsCSSisntaprogramminglanguageand
youcantdynamicallyupdatestylessowhynotjusttypeinthecorrectnumberinthefirstplace?

Referencias
http://www.vanseodesign.com/css/csspreprocessors/
http://thesassway.com/
http://sasslang.com/
http://www.amberweinberg.com/januarys12412researchinglesssass/
http://code.tutsplus.com/tutorials/sassvslessvsstylusapreprocessorshootoutnet24320
DocumentocreadoporFranciscoQuintero

También podría gustarte