mirror of
https://github.com/flarum/core.git
synced 2025-07-27 03:30:28 +02:00
Include LESS mixins and variables in all frontend compilers
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
@import "print";
|
@import "print";
|
||||||
@import "scaffolding";
|
@import "scaffolding";
|
||||||
@import "sideNav";
|
@import "sideNav";
|
||||||
@import "mixins";
|
|
||||||
|
|
||||||
@import "App";
|
@import "App";
|
||||||
@import "Alert";
|
@import "Alert";
|
||||||
@@ -27,5 +26,3 @@
|
|||||||
@import "Search";
|
@import "Search";
|
||||||
@import "Select";
|
@import "Select";
|
||||||
@import "Tooltip";
|
@import "Tooltip";
|
||||||
|
|
||||||
@import "variables";
|
|
||||||
|
@@ -33,8 +33,8 @@ class FrontendServiceProvider extends AbstractServiceProvider
|
|||||||
$this->app->basePath().'/vendor/components/font-awesome/less' => ''
|
$this->app->basePath().'/vendor/components/font-awesome/less' => ''
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$assets->css([$this, 'addLessVariables']);
|
$assets->css([$this, 'addBaseCss']);
|
||||||
$assets->localeCss([$this, 'addLessVariables']);
|
$assets->localeCss([$this, 'addBaseCss']);
|
||||||
|
|
||||||
return $assets;
|
return $assets;
|
||||||
};
|
};
|
||||||
@@ -70,7 +70,15 @@ class FrontendServiceProvider extends AbstractServiceProvider
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addLessVariables(SourceCollector $sources)
|
public function addBaseCss(SourceCollector $sources)
|
||||||
|
{
|
||||||
|
$sources->addFile(base_path().'/vendor/flarum/core/less/common/variables.less');
|
||||||
|
$sources->addFile(base_path().'/vendor/flarum/core/less/common/mixins.less');
|
||||||
|
|
||||||
|
$this->addLessVariables($sources);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function addLessVariables(SourceCollector $sources)
|
||||||
{
|
{
|
||||||
$sources->addString(function () {
|
$sources->addString(function () {
|
||||||
$settings = $this->app->make(SettingsRepositoryInterface::class);
|
$settings = $this->app->make(SettingsRepositoryInterface::class);
|
||||||
|
Reference in New Issue
Block a user