Less compiling on FTP server - css

I'm working on a project directly on a FTP server (normally I work locally). I use Visual studio to edit and compile my LESS files. When the LESS file is compiled to css, the site wont' update to the newest css rules. When I manually save the css file the changes become visible.
Does anybody know what the issue is here? I haven't got a clue.

Related

Visual Studio CSS not working in compiled app

I am new to Visual Studio 2019 and I am having a bit of a problem with my CSS stylesheet location. I am using the Peachpie.App NuGet and everything works perfectly when I run the Debug (F5) with the correct stylesheet being used but if I run the compiled application executable I loose all of the CSS formatting. I assume I have got the style.css file in the wrong location for the compiling process to pick it up but I don't know how to resolve that, can anyone provide some advice on this?
Thanks,
Gerry
I manually copied the style.css file to the "\bin\Release\net5.0\wwwroot" directory and it resolved the problem but I should have expected that that would have been down during the Build process.

Css changes is not reflecting in Django

I'm doing Django project, my issue is when I change colors in style.css file in static folder, the changes aren't reflecting on the website again the same old colors are coming.
ScreenShot of my project file directory
Unlike with Python files, Django doesn't automatically refresh the server each time a static file is updated. What most official sources recommend is running py manage.py collectstatic.
This often doesn't work (at least for me), but all CSS changes are usually implemented after a complete reboot.
So try saving, closing all your files, then restarting your computer. It's a simple workaround, but it's often reliable.

Eclipse CSS Debug w/ Sass Not Loading Changes

My Eclipse project uses Sass. When running in debug mode, sass:watch (configured per this article) correctly polls for changes to *.scss files, compiles them into CSS and places them in the target directory. However, these changes are not reflected on the page, and inspecting the page using Chrome developer tools shows the new CSS is not picked up.
Using another (CSS-only) project works as expected: any change to CSS is copied to target directory, and a refresh of the page reflects the proper change.
I ran across a similar issue someone had using LESS. Unlike that situation, though, even changing the target CSS directly, the change is not reflected in the browser.
I can't be the only person debugging Sass/CSS in Eclipse, but I can't find any info on this problem.
Any ideas on how to fix this?
EDIT: SCSS is being compiled to CSS and copied to the target build directory, but not into the Tomcat deployment where the code is running. As I've said, this is not an issue with CSS-based projects, only with this where it's a compiled file.
Solved the problem...
An entry needed to be added to Eclipse’s Web Deployment Assembly so that Eclipse would see this dynamically-generated folder and associate it with the project.
The files were being generated to the local_repo/target/branch_name directory, where branch_name was dynamic, and dependent upon what branch you were working on; this made it impossible to create a static entry in Eclipse WDA for us.
Our solution was to have Maven (1) create a sass-generated/css directory under local_repo/target, and (2) copy the css over into the branch_name/static directory where it belongs.
Now, when debugging locally and running Sass Watch, changes to *.scss files are detected, compiled to css, and deployed to the sass-generated/css directory. Since this dir is associated with the project in Eclipse WDA, Eclipse sees the change and deploys it to Tomcat as expected!

Non-project files with ReSharper (SASS)

I'm running JetBrains ReSharper 8.2 on a project that uses SASS for styling.
I compile my seperate scss files into one file "common.css". This file is not included in the project, but gets compiled on build on the server (grunt + compass takes care of this).
I don't want to include this file, but only my SCSS files in the project. This however causes ReSharper to report a lot of errors ("Unknown CSS class"...) in my views because the file isn't included.
Is there a workaround for this (without disabling css errors in settings)?
I've tried the "ReSharper.ExternalCode" extension (https://resharper-plugins.jetbrains.com/packages/ReSharper.ExternalCode), but without any luck.
Sadly, there isn't a workaround for this. ReSharper doesn't know about SCSS files, and doesn't know anything about files that aren't included in the project, so it can only assume the CSS classes are undefined.
The external code plugin should work and allow ReSharper to process the resulting css file. However, I'm not sure how flexible it is - I think it needs everything to be configured before the solution is opened. That is, it only tells ReSharper about the generated file when the solution is being opened. Configuring things while a solution is open probably won't be reflected immediately (but I haven't tried it). Similarly, it doesn't notify ReSharper of changes to the file, and I don't think that ReSharper sets up any monitoring. So if the file isn't available when the solution opens, or changes while it's open, ReSharper won't have correct information. I'd try and configure it, close the solution and reopen.

VS2013 do not create a min.css

I have a LESS file that when saved ONLY updates the non-minified css file. No matter what I do it will not update the min file. I can of course minify the main via web essentials, but that sort of negates the function of compiling LESS on save...
There is no error or anything - it just happily ignores the min.css file. In VS2012 it works perfectly.
Does anyone have any idea of what to do about this?
/Erik
It can be done via setting: Tools -> Options -> Web Essentials -> LESS.
I found the answer here - How to ignore certain LESS files in Web Essentials LESS compiling? (Bootstrap)
Update:
This option must be set on CSS, see screenshot:
After this when you save LESS it will create a .min.css file too.

Resources