Sass – Getting started

Stefanescu Mihai 3 years ago Sass si Scss
Acest articol face parte din cursul Toate lectiile SASS & SCSS. Te poti inscrie la acest curs aici!

In aceasta serie de tutoriale am sa va vorbesc despre sass, un preprocesor pentru CSS ce ne va ajuta sa scriem si sa modificam CSS-ul mult mai usor.

Pentru inceput am sa va povestesc putin despre ce ne ofera acest sass. Unul dintre cele mai importante lucruri oferite de sass sunt variabilele.

Probabil va intrebati la ce ne folosesc variabilele in CSS? Ei bine, sa presupunem ca avem de facut un site su mai multe noante de alabastru, totul functioneaza perfect pana acum…dar daca la un moment dat va trebuii sa schimbam acele nuante de albastru cu niste nuante de verde? Ctrl + F, inlocuim prima noanta peste tot, Ctrl + F si inlocuim a doua nuanta, si tot asa? Nu ar fi mai simplu sa schimbam intr-un singur loc?

Hai sa nu mai pierd vremea despre ce am de gand sa va prezint mai tarziu oricu si sa incep sa va povestesc despre instalare.

Primul lucru de care aveti nevoie pentru sass este ruby. Pentru a-l obtine nu trebuie decat sa intrati pe acest website: si descarcati installerul, il deschide-ti si urmati pasii (Next, Next…Finish, o chetsie cat se poate de obisnuita). Daca sunteti pe windows probabil o sa fie necesar sa setati PATH-ul catre ruby, iar pentru a face asta nu trebuie decat sa da-m click dreapta pe My Computer > Properties > Advanced system settings > Environment Variables , aici la System Variables cautam Path, dam edit pe el si scriem la sfarsitul sirului de caractere acest cod:


Acum, pentru a verifica daca totul functioneaza cum ar trebuii deschidem cmd-ul si scriem urmatoarea comanda:

ruby -v

Acum, daca totul s-a instalat cum trebuia ar trebuii sa vedeti urmatorul mesaj:

Acum, pentru a instala sass rulam urmatoarea comanda:

gem install sass

Pentru a verifica daca totul a decurs corect rulam comanda:

sass -v

Daca vedem urmatorul mesaj inseamna ca avem sass instalat si putem merge mai departe:

Gata, acum ca am terminat cu instalarea ruby si sass putem sa ne apucamd e treaba.

inca de la inceput trebuie sa va anunt ca browserele nu “inteleg” sass sau scss, ci doar CSS, de aceea mai devreme am spus ca sass este un preprocesor pentru CSS, pentru ca dupa scriem codul SASS/SCSS il vom compila intr-un fisier CSS.

In acest articol va mai arat un singur lucru si continuam in urmatorul.

Mi-am creat un folder nou pe desktop numit ‘Tutorial Sass’ in care am un fisier HTML index.html si un folderstyle cu un fisier style.scss, ce trebuie sa facem pentru a compila acest fisier?

Din cmd navigam in folder-ul cu cu fisierul sass folosind comanda cd, iar apoi pentru a compila fisierul scss rulam comanda:

sass --watch fisier_sass.scss:fisier_css.css

Iata cum arata cmd-ul meu in urma rulari acestor comenzi:

Nu trebuie sa rulati aceasta comanda dupa fiecar schimbare in fisierul scss, doar lasati cmd-ul pornit si de fiecare data cand faceti o modificare in fisier si salvati aceasta va fi detectata si va compila automat fisierul.

Programator de ~8 ani, am lucrat la proiecte din mai multe industrstrii, de la eCommerce la telecomunicatii la automatizari. In acest timp am folosi diferite tehnologii, de la PHP, MySQL, PostgreSql, RabbitMq, Redis, Memcached si altele.

Get in touch
Pentru nelamuriri, dubii, comentarii si chestii de pe suflet ne putem auzi pe Discord, Reddit sau poti deschide o discutie noua pe forum

Elvira # 8 months ago how to start an herbal supplement affiliate business graphic design jobs for moms earn from home with natural supplements affiliate marketing PharmEmpire affiliate network sign-up
Cnjsnj # 3 months ago fenofibrate 200mg for sale <a href="">fenofibrate 160mg for sale</a> purchase fenofibrate generic
Kaersu # 3 months ago buy zaditor generic <a href="">doxepin 75mg generic</a> order imipramine without prescription
Ktucke # 3 months ago cheap minoxytop <a href="">buy minoxytop without prescription</a> cheap erectile dysfunction pills online
Cswygu # 3 months ago precose where to buy <a href="">fulvicin where to buy</a> griseofulvin cost
Uhadab # 3 months ago generic aspirin <a href="">buy imiquad generic</a> order imiquad creams
Vquwhd # 3 months ago melatonin cheap <a href="">cerazette oral</a> order danazol 100 mg
cefix recomendado por especialistas # 3 months ago Hmm is anyone else encountering problems with the images on this blog loading? I'm trying to find out if its a problem on my end or if it's the blog. Any responses would be greatly appreciated.
Cuacgg # 3 months ago dydrogesterone pills <a href="">order dapagliflozin without prescription</a> cheap jardiance 10mg
Xktcsb # 3 months ago order florinef online <a href="">florinef 100 mcg price</a> imodium 2 mg drug
drospirenone beschikbaar in België # 3 months ago Amazing things here. I am very satisfied to peer your post. Thanks so much and I'm having a look ahead to touch you. Will you kindly drop me a e-mail?
Shalanda # 3 months ago I'm now not certain where you are getting your information, however great topic. I needs to spend a while studying more or figuring out more. Thanks for magnificent information I was on the lookout for this info for my mission.
Zvnkby # 3 months ago prasugrel us <a href="">dramamine 50 mg pills</a> order tolterodine 1mg generic
Aundrea # 3 months ago My partner and I absolutely love your blog and find most of your post's to be just what I'm looking for. can you offer guest writers to write content in your case? I wouldn't mind publishing a post or elaborating on some of the subjects you write related to here. Again, awesome web log!
Xacywp # 3 months ago buy monograph without prescription <a href="">generic mebeverine 135 mg</a> pletal 100mg pills
mectizan 3 mg indicación en venta en Colombia # 3 months ago Thanks for sharing your thoughts. I really appreciate your efforts and I am waiting for your next post thanks once again.
Medikamente diskret versandt # 3 months ago Your style is really unique in comparison to other folks I've read stuff from. Thanks for posting when you've got the opportunity, Guess I will just book mark this page.
Wxnhkw # 3 months ago order ferrous sulfate 100mg online <a href="">actonel pills</a> betapace 40mg pill
Xlwcpf # 2 months ago buy enalapril 10mg for sale <a href="">cost doxazosin 1mg</a> buy duphalac cheap
Lnsbiw # 2 months ago betahistine brand <a href="">order haldol 10 mg pills</a> order benemid 500 mg without prescription
Jukgrp # 2 months ago xalatan order <a href="">brand xalatan</a> purchase rivastigmine online
waar bonapex zonder recept te kopen # 2 months ago Hey there! Do you use Twitter? I'd like to follow you if that would be ok. I'm undoubtedly enjoying your blog and look forward to new posts.
piramil à un prix compétitif # 2 months ago Thankfulness to my father who informed me regarding this weblog, this blog is really remarkable.
Mgqpcy # 2 months ago telmisartan over the counter <a href="">purchase plaquenil generic</a> buy generic molnupiravir over the counter
Ngenrg # 2 months ago buy cenforce 50mg pill <a href="">brand cenforce 100mg</a> chloroquine uk
stendra 200 mg disponibile senza necessità di prescrizione medica # 2 months ago Hi, after reading this remarkable post i am too delighted to share my experience here with colleagues.
Uvcusl # 2 months ago online casino game <a href="">best casinos</a> ivermectin without prescription
Akxcze # 2 months ago buy symmetrel 100mg sale <a href="">purchase symmetrel pills</a> dapsone online buy
Sazgdi # 2 months ago methylprednisolone 8 mg without a doctor prescription <a href="">oral aristocort</a> generic triamcinolone 10mg
Aaixes # 2 months ago order generic serophene <a href="">order azathioprine 50mg pills</a> order azathioprine pill
Qdnmzt # 2 months ago buy vardenafil sale <a href="">cost digoxin</a> buy tizanidine medication
Lfpmci # 1 month ago order generic coversyl <a href="">buy clarinex no prescription</a> fexofenadine 120mg us
achat de metronidazole en Belgique # 1 month ago Just desire to say your article is as astonishing. The clearness in your post is just nice and i can assume you are an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please keep up the enjoyable work.
Zouzci # 1 month ago dilantin 100 mg sale <a href="">dilantin 100 mg price</a> oxybutynin order online
Vbjrxc # 1 month ago baclofen online order <a href="">buy cheap generic ketorolac</a> toradol 10mg brand
Pngfxq # 1 month ago order baclofen 10mg <a href="">cheap toradol 10mg</a> toradol canada
¿se puede obtener mobic sin receta en España? # 1 month ago Do you have any video of that? I'd want to find out some additional information.
gdzie znale?? wskazówki # 1 month ago Very good blog you have here but I was curious if you knew of any message boards that cover the same topics discussed in this article? I'd really like to be a part of community where I can get suggestions from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Many thanks!
Wmmsqu # 1 month ago order amaryl 1mg generic <a href="">order cytotec 200mcg pills</a> buy etoricoxib 120mg generic
Yhrjvq # 1 month ago nortriptyline 25mg oral <a href="">pamelor 25mg tablet</a> paracetamol us
Oziljv # 1 month ago buy orlistat online <a href="">order generic diltiazem</a> order generic diltiazem
pharmacie vendant du pletasmin à Lyon # 1 month ago Great goods from you, man. I have understand your stuff previous to and you are just extremely magnificent. I really like what you have acquired here, certainly like what you are saying and the way in which you say it. You make it entertaining and you still take care of to keep it sensible. I can not wait to read much more from you. This is really a tremendous site.
Fhtjqt # 1 month ago buy medex online cheap <a href="">buy generic maxolon</a> metoclopramide us
Vaxpbd # 1 month ago astelin cheap <a href="">zovirax online buy</a> order irbesartan 300mg without prescription
Larxos # 1 month ago order pepcid online cheap <a href="">cheap pepcid 20mg</a> generic prograf
Nbdczr # 1 month ago nexium 40mg cost <a href="">buy remeron sale</a> buy topiramate 200mg sale
Wclekr # 1 month ago allopurinol 300mg ca <a href="">allopurinol 100mg for sale</a> order crestor 10mg pills
Aozcse # 1 month ago sumatriptan order online <a href="">sumatriptan 50mg us</a> avodart pills
Xosdgu # 1 month ago order buspirone 5mg without prescription <a href="">buy amiodarone 200mg</a> order amiodarone pill
fosamax zonder recept verkrijgbaar in Nederland # 1 month ago I'd like to find out more? I'd care to find out more details.
Fetzcd # 1 month ago buy motilium 10mg sale <a href="">domperidone 10mg cheap</a> cheap tetracycline
Ndcaln # 1 month ago buying a research paper for college <a href="">assignment writing services</a> help with term papers
Fenywq # 1 month ago purchase diflucan sale <a href="">ciprofloxacin oral</a> cipro 500mg uk
Ldsglq # 4 weeks ago lamotrigine 200mg tablet <a href="">order prazosin 1mg pill</a> purchase mebendazole
Ikaeqh # 3 weeks ago order cleocin 300mg pills <a href="">buy clindamycin paypal</a> buy fildena 100mg
Alwriu # 3 weeks ago buy tamoxifen 20mg pills <a href="">buy generic budesonide</a> budesonide order online
Ktqbqs # 3 weeks ago purchase ceftin pill <a href="">buy bimatoprost eye drops for sale</a> buy robaxin pills for sale
Mmbcck # 2 weeks ago essay for you <a href="">courseworks</a> how to get suprax without a prescription
waar dormelox zonder voorschrift te krijgen in Nederland # 2 weeks ago I like the helpful info you provide in your articles. I will bookmark your blog and check again here regularly. I'm quite certain I'll learn many new stuff right here! Best of luck for the next!
Xlchqd # 2 weeks ago buy trimox tablets <a href="">macrobid pills</a> biaxin sale
Wsfmwp # 2 weeks ago calcitriol online order <a href="">where to buy labetalol without a prescription</a> order tricor 160mg online cheap
Rdmxat # 2 weeks ago catapres 0.1 mg for sale <a href="">order meclizine 25mg</a> buy spiriva 9mcg sale
Irotkj # 1 week ago get acne pills <a href="">buy generic trileptal</a> buy trileptal 300mg sale
Kdwxxq # 1 week ago order minocin for sale <a href="">buy minocycline online</a> buy ropinirole generic
Cbfhwd # 1 week ago cost alfuzosin 10 mg <a href="">claritin allergy sinus 12hr costco</a> acetaminophen for abdominal pain
Bnbwfs # 1 week ago cost femara 2.5 mg <a href="">buy femara 2.5mg without prescription</a> purchase aripiprazole generic
Wfhsal # 1 week ago most potent sleeping pills <a href="">best selling sleeping pills</a> diet master pills from mexico
Ypiiul # 1 week ago medroxyprogesterone medication <a href="">brand medroxyprogesterone 5mg</a> microzide online buy
Wlfefr # 1 week ago 1 800 quit now free patches <a href="">biological dmards list of medications</a> free pain pills online
Htfvkp # 1 week ago periactin brand <a href="">luvox buy online</a> nizoral 200mg uk
Iofzwh # 1 week ago daily antiviral medication for herpes <a href="">which inhaled corticosteroid is cheapest</a> latest treatment for diabetics
Cnjghx # 5 days ago 4 types of antifungal medicaments <a href="">stopping high blood pressure meds</a> blood pressure pills names chart
Lnqxmf # 4 days ago how painful are stomach ulcers <a href="">antibiotics for gram positive uti</a> different types of bladder infections
Iuwbpx # 4 days ago buy promethazine online <a href="">buy cheap generic ed pills</a> cost for ivermectin 3mg
prezzo di provera in Italia # 2 days ago Great article! This is the type of info that are meant to be shared across the net. Shame on the search engines for no longer positioning this put up upper! Come on over and seek advice from my site . Thanks =)
Zpelxu # 16 hours ago best otc daily heartburn medicine <a href="">medicine for vomiting for adults</a> anti fart medication
Club-ul este dedicat membrilor si ofera access la mai multe zone ale website-ului.
Login Register

🔖 Bookmarks
✨ Pentru a sustine aceasta comunitate am sa te rog sa te autentifici sau sa te inregistrezi!

🌪️ Discord
Back to top
Folosim cookie-uri pentru a oferi functionalitatile critice ale aplicatiei Invata-Programare. Folosim cookie-uri si pentru a analiza traficul, pentru care e nevoie de consimtamantul dvs. explicit.