3

I use Laravel 5 and Elixir.

I have app.scss which imports _bootstrap.csss (installed by bower), and these files are compiled to one file public/css/app.css.

Also I have some CSS files in other dependencies (installed by bower), and I want to add them to public/css/app.css.

How can I do it?

2 Answers 2

1

First you'll need to rename your .css file as a .scss file, then you can import the new .scss file into the app.scss file using the same method _bootstrap.scss is imported.

@import "path/to/css/file.scss";
Sign up to request clarification or add additional context in comments.

2 Comments

This file is installed with bower. It's a dependency. I shouldn't rename or patch dependency files.
True, I didn't notice that in your question. In the past I've created a new scss file and imported app.scss and other CSS/SCSS files I want compiled in the CSS file.
0

In you app.scss file you can import both formats .scss and .css

To import a SCSS file this is the sintax: (without extension)

@import '~bootstrap/scss/bootstrap';

Instead to import a CSS file you have to add the .css extension

@import "~jquery-ui/themes/base/core.css";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.