SCSS and other preprocessors
I will highlight the things I like and find meaningful. However, if CSS were to add these to its specification, I’m certain I wouldn’t even look at SCSS anymore.
- Nesting CSS with the necessary ampersand
&
variable - The fact that media queries can be written anywhere, even immediately alongside deeply nested CSS rule
Confusion regarding the removal of @import
I’ve tried various things, and it seems like they are trying to steer people away from CSS. Why am I convinced of this?
Tried, won’t work:
-
Deprecation Warning: As of Dart Sass 2.0.0, !global assignments won’t be able to declare new variables. Recommendation: add
$html: null
at the stylesheet root.@if not global-variable-exists('html') { $html: html !global; }
-
Error: This module and the new module both define a variable named “$html”
SCSS prešao sam na jebeni import
prevedi poruku na engleski
i ova nova:
I napokon moram da otvorim svoje pitanje pošto sam već više puta u nekoliko navrata pokušavao da rešim ovaj problem.
Kako se sa import prelazi na “@use i @forward”
I i dalje niko nije odgovorio na ono što je čovek pitao. Mislim meni je nestvarno da nekoliko sati pokušavam da nađem rešenje za jednu prostu stvar, a da ne koristim “@import”
Naime, problem je toliko jednostavan da je to strašno, a niko da napiše jednostavno:
-
Ne želim da menjam NIKAKO fajlove u poslednjem nivou foldera jer su to vrlo često samo obični CSS iz raznih biblioteka. Ne želim da ih pakujem unutar “@mixin” i da ih posle “@forward”-ujem i slično. Želim samo obične originalne fajlove.
-
U originalnom Nestvarno je koliko
I na kraju, sve ovo hoću da wrapujem jer imam problem sa scope?
CSS preprocessors
First notes from 2013-03-17, just as an interesting fact for me
SASS, LESS, Stylus
http://css-tricks.com/sass-vs-less/ :: SASS vs. LESS | CSS-Tricks http://designshack.net/articles/css/sass-vs-stylus-who-wins-the-minimal-syntax-battle/ :: Sass vs. Stylus: Who Wins the Minimal Syntax Battle? | Design Shack
http://compass-style.org/ :: Compass Home | Compass Documentation
http://learnboost.github.com/stylus/ :: Stylus https://github.com/visionmedia/nib#readme :: visionmedia/nib · GitHub
Arbitrary CSS preprocessing library for node.js https://github.com/visionmedia/rework#readme :: visionmedia/rework
SCSS
A Proof of Concept for Making Sass Faster | CSS-Tricks - CSS-Tricks tonyganch/gonzales-pe: CSS parser with support of preprocessors medialize/sass.js: Sass.js - API for emscripted libsass to run in the browser
Opet o SCSS: No seriously: Don’t use @extend
Razni alati:
css2sass | Convert CSS to SASS / SCSS code ništa nije zajebao, ali ne izvlači boje niti fontove. Ustvari, on je bolji, pošto lepo ukapira kada su stilovi isti pa ih grupiše pod zajednički selector. Dakle, bolji je on.
Repo je jpablobr/css2sass: Convert CSS Snippets to Syntactically Awesome StyleSheets code
Kada bi još imao “Use variables”.
- sortiranje propertia
- brisanje dupliranih
2. CSS to SCSS Converter - CSS Portal on jedinop što izvlači boje i fontove, ali nešto baš glupav za sve ostalo.
Najjednostavniji način da koristiš SCSS
|
|