Automattic / _s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
http://underscores.me/
GNU General Public License v2.0
10.92k stars 3.12k forks source link

Using prefixes when compiling SASS CSS with "npm run watch" #1510

Closed Marc-MMA closed 2 years ago

Marc-MMA commented 2 years ago

Hello,

I wouldn't lie to you if I said I've been trying for 24 hours... (I'm clearly not a big programmer!)

I've always used Gulp to do this, but I wish I could do without it.

So I've tried a lot of things, a lot... Now I'm trying to use this : image simply.

The command works, but only if the destination path is the "build" folder (I can't do it in the main theme folder).

My other problem is that I can't decide the browser version for the prefix. I'd like it to take the last 4. So this way the command doesn't add me any prefix or almost. I would like to specify somewhere "latest 4 version". I am not able to do that either...

And secondly I would like to automate it, so that it adds the prefixes automatically when I run my "npm run watch".

Believe me I have exhausted the documentation and my little knowledge to do this but I am not able to do anything anymore...

Why didn't you integrate the prefixes natively during a run watch in the underscores theme?

Otherwise I will go back to Gulp...

Thanks

Translated with www.DeepL.com/Translator (free version)

Marc-MMA commented 2 years ago

I couldn't figure out how to delete my topic.

I finally found something that works here (sorry it's in French) https://openclassrooms.com/fr/courses/6106181-simplifiez-vous-le-css-avec-sass/6612156-utilisez-autoprefixer-pour-creer-du-code-adapte-a-tous-les-navigateurs

So I can get what I want to work by using the npm run prefix command: image

I just have to find a way to automate it when I save with the npm run watch :)