Understanding the Assets in a Fresh Laravel Installation

Posted 2 years ago by fsdolphin

I would like to have a better understanding on the default assets on a fresh Laravel installation.

Here are my silly questions...

  1. In a fresh Laravel 5.4 installation, why does the public/css/app.css contains code if Laravel Mix hasn't run yet?

  2. Why does the same import for the fonts exists in both the .css and .scss, shouldn't the one in the .scss be enough?

  3. Couldn't the normalize be an import in the .scss instead?

  4. Also, what are the Laravel variables in the _variables.scss file for? Where are these going to be applied?

Laravel Variables...

// Borders
$laravel-border-color: darken($body-bg, 10%);
$list-group-border: $laravel-border-color;
$navbar-default-border: $laravel-border-color;
$panel-default-border: $laravel-border-color;
$panel-inner-border: $laravel-border-color;

I was expecting to see imports in the resources/assets/sass/app.scss file but nothing in the public/css/app.css until you run mix.

Can someone elaborate a little bit on this? I'm just trying to understand the purpose of this code structure.

Thanks a lot.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.