Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
de5cfa49
Commit
de5cfa49
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix integration of scss php compiler, fixes #1574
Closes #1574 Merge request
studip/studip!1004
parent
4b3fec9a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/assets/SASSCompiler.php
+7
-7
7 additions, 7 deletions
lib/classes/assets/SASSCompiler.php
with
7 additions
and
7 deletions
lib/classes/assets/SASSCompiler.php
+
7
−
7
View file @
de5cfa49
...
...
@@ -6,7 +6,7 @@ use StudipCacheFactory;
use
Studip
;
use
ScssPhp\ScssPhp\Compiler
as
ScssCompiler
;
use
ScssPhp\ScssPhp\
Formatter
;
use
ScssPhp\ScssPhp\
OutputStyle
;
/**
* SCSS Compiler for assets.
...
...
@@ -48,7 +48,7 @@ class SASSCompiler implements Compiler
* core system can be used. This includes colors and icons.
*
* @param String $input Scss content to compile
* @param
A
rray $variables Additional variables for the LESS compilation
* @param
a
rray $variables Additional variables for the LESS compilation
* @return String containing the generated CSS
*/
public
function
compile
(
$input
,
array
$variables
=
[])
...
...
@@ -59,14 +59,14 @@ class SASSCompiler implements Compiler
$compiler
=
new
ScssCompiler
();
$compiler
->
addImportPath
(
"
{
$GLOBALS
[
'STUDIP_BASE_PATH'
]
}
/resources/"
);
$compiler
->
set
Variables
(
$variables
);
$compiler
->
add
Variables
(
$variables
);
if
(
Studip\ENV
===
'production'
)
{
$compiler
->
set
Formatter
(
Formatter\Crunched
::
class
);
$compiler
->
set
OutputStyle
(
OutputStyle
::
COMPRESSED
);
}
else
{
$compiler
->
set
Formatter
(
Formatter\Expanded
::
class
);
$compiler
->
set
LineNumberStyle
(
ScssCompiler
::
LINE_COMMENTS
);
$compiler
->
set
OutputStyle
(
OutputStyle
::
EXPANDED
);
$compiler
->
set
SourceMap
(
ScssCompiler
::
SOURCE_MAP_INLINE
);
}
$css
=
$compiler
->
compile
(
$scss
);
$css
=
$compiler
->
compile
String
(
$scss
)
->
getCss
(
);
$css
=
preg_replace
(
'~/\*.*?\*/~s'
,
''
,
$css
);
$css
=
trim
(
$css
);
return
$css
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment