astroid-framework icon indicating copy to clipboard operation
astroid-framework copied to clipboard

Framework 2.6.2 cleans custom.css

Open fontanil opened this issue 2 years ago • 7 comments

Hi,

Each time I clean the Astroid cache, the media/templates/site/astroid_template_one/css/custom.css is deleted. :( I need to let it in the temlate/astroid_template_one/css folder.

fontanil avatar Oct 15 '22 10:10 fontanil

Normally, Astroid will clear complied files only. It's very strange. I will test it and response on Monday. Have a nice weekend, bro.

Best regards, Sonny

sonvnn avatar Oct 15 '22 12:10 sonvnn

Yes, I just test and only if the file is name custom.css (in the media folder) is deleted on Astroid cache clearing.

— I put few other css files in the media/templates/site/yourtemplate/css/ with name like aos.css, editor.css and they are not deleted?

I don't think it should delete custom.css????

A permanent or temporary solution will be to rename your custom.css to custom.scss and place it in the scss folder. It will be compiled and added to your compiled.css files each time you clear the cache.

Screen Shot 2022-10-15 at 8 56 28 AM

I personally love the scss solution as you can easily use variable (lot easier than css variables)

Example of variable in scss Put your variable at the top of your scss file

///*:::::::::::::::::::::::::::::::::::::::::::::::: SCSS VARIABLES ::::::::::::::::::::::::::::::::::::*/
///* eFoilSurf logo --------*/
	$logo-beige: #f1ead6;
	$logo-orange: #da9630;
	$logo-blue: #87a5a6;
	$logo-black: #35312e;

and after you can insert this in your scss code section#blocks-expertise div.row { border-bottom: 5px solid $logo-black;}

You can have anything in variable like, :

///*Title & Texts --------*/  
	$title-font:'Barlow', Verdana, sans-serif;
	$body-font:"Source Sans Pro", Verdana, sans-serif;
	
	///* Color & Weight*/
	$big-title-color: #000000;
	$sub-title-color: #80455E; ///* Dark Red Purple */
	$title-secondary-color: #7e7ba5; ///* Purple */
	$title-secondary-color-transparent: rgba(126, 123, 165, 0.4) ; ///* Purple 40% */  
	$body-text-color: #646464;
	$regular: 400;
	$semibold: 600;
	$bold: 700;
	$title-regular: 500;
	$title-bold: 600;

An example for the font family and weight above: div.login-form {font-family: $body-font; font-weight: $regular}

Really powerful and easy to work with...

Chacapamac avatar Oct 15 '22 12:10 Chacapamac

I renamed custom.css into user.css and it's not deleted.

fontanil avatar Oct 15 '22 13:10 fontanil

Yep, that work to as any .css file seem to work except custom.css

Good Day everybody!

Chacapamac avatar Oct 15 '22 15:10 Chacapamac

@fontanil @Chacapamac Hello, I fixed this issue on https://github.com/templaza/astroid-framework/commit/76fedbf3cc7ce986a607e3945cc036ca3ca832d1

Please help me download developer branch and re-check it again.

Thanks & Best Regards, Sonny

sonvnn avatar Oct 17 '22 08:10 sonvnn

Thanks Sonny! I tried on a test site and it works. The custom.css file is not deleted when I clean the Astroid cache!

fontanil avatar Oct 17 '22 09:10 fontanil

@sonvnn — Work!, custom.css is not deleted when clearing cache. Good Day!

Chacapamac avatar Oct 17 '22 13:10 Chacapamac