I have a problem with Laravel 5 and SASS. I am trying to use Sass as my style sheets like you would normally do with css. But I am not able to combine them in one laravel project.
The code in public/scss/style.scss
$color_one: green;
$color_two: yellow;
body {
background-color: $color_one;
.container {
background-color: $color_two;
}
}
Code in public/index.php
SassCompiler::run("public/scss/", "public/css/");
Code in resources/views/hello.php
<!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link rel="stylesheet" type="text/css" href="public/css/style.css">
</head>
<body>
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
This is the master sidebar.
<div class="container">
</div>
</div>
</div>
</body>
</html>
Notice that I use a normal link to link css to HTML.
Hope someone can help.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire