0
votes

I have purchased a theme for Prestashop. Now I need to customize some css styles. Naturally I use compass to compile css files and the theme has already a sass folder. When I launch "compass watch" from root/themes/my-theme all css files are deleted and recompiled with scss files from the sass theme folder.

The result is that all style seems to be reset to the default prestashop theme default-bootstrap.

This is the config.rb inside the theme folder:

# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"enter code here
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
fonts_dir = "fonts"

output_style = :nested
environment = :development

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
color_output = false

sourcemap = true

# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass

I can't find a way to not override the css theme files.

1
You either modify the source (bad idea, if you want to update the theme later and still have your customisation in place), or (1) include your own CSS override using @include, or (2) reference your custom CSS override as a separate file in your theme, after the parent theme CSS has been loaded.Terry
Ok, but at the moment without any kind of customisation if i launch compass watch the styles are going to be resetted. I can't understand why.Rodlen
Compass/Sass is only going to generate files based on the Sass files you give it. There's no mystery here.cimmanon
Of course. Compass cleans the target directory and then writes new files to it. What would be the issue? Your files should reside in the source directory, anyway—not in the target directory. The latter is only for generated/processed files that are deployment rest.Terry
Well, I looks like your .scss don't correspond to .css files of the theme. Don't be surprised here, the theme authorr probably forked default heme but didn't use the .scss files, he just edited .css files. I've come across theme that had outdated .scss files, which would compile to current .css partially.gskema

1 Answers

2
votes

The result is that all style seems to be resetted to the default PrestaShop theme default-bootstrap.

It looks like the theme you bought used CSS-only. Hence your sass files aren't synchronised with your CSS. The best way would be to ask your theme developer.