Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bootstrap4-3224979
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
bootstrap4-3224979
Commits
1dde906f
Commit
1dde906f
authored
5 years ago
by
Vladimir Roudakov
Committed by
Vladimir Roudakov
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3026316
by VladimirAus: Subtheme SASS is not compiling
parent
ad2d388d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootstrap4.theme
+16
-10
16 additions, 10 deletions
bootstrap4.theme
with
16 additions
and
10 deletions
bootstrap4.theme
+
16
−
10
View file @
1dde906f
...
...
@@ -78,8 +78,8 @@ function bootstrap4_form_system_theme_settings_alter(&$form, FormStateInterface
*/
function
bootstrap4_form_system_theme_settings_submit
(
$form
,
FormStateInterface
$form_state
)
{
$active_theme
=
\Drupal
::
service
(
'theme.manager'
)
->
getActiveTheme
()
->
getName
();
$css
F
ilename
=
$active_theme
.
'.sass.css'
;
_bootstrap4_sass_compile
(
$css
F
ilename
);
$css
_f
ilename
=
$active_theme
.
'.sass.css'
;
_bootstrap4_sass_compile
(
$css
_f
ilename
);
}
/**
...
...
@@ -99,17 +99,23 @@ function bootstrap4_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface
$active_theme
=
\Drupal
::
service
(
'theme.manager'
)
->
getActiveTheme
()
->
getName
();
$pathfull
=
\Drupal
::
service
(
'file_system'
)
->
realpath
(
'public://'
.
$active_theme
);
$cssPath
=
str_replace
(
DRUPAL_ROOT
.
'/'
,
''
,
$pathfull
);
$cssFilename
=
$active_theme
.
'.sass.css'
;
$originalCss
=
'themes/custom/bootstrap4/css/bootstrap4.sass.css'
;
$css_path
=
str_replace
(
DRUPAL_ROOT
.
'/'
,
''
,
$pathfull
);
$css_filename
=
$active_theme
.
'.sass.css'
;
_bootstrap4_sass_compile
(
$cssFilename
);
foreach
(
array_keys
(
$css
)
as
$original_css
)
{
if
(
strpos
(
$original_css
,
'bootstrap4/css/bootstrap4.sass.css'
)
>
0
)
{
if
(
isset
(
$css
[
$originalCss
]))
{
$css
[
$cssPath
.
'/'
.
$cssFilename
]
=
$css
[
$originalCss
];
$css
[
$cssPath
.
'/'
.
$cssFilename
][
'data'
]
=
$cssPath
.
'/'
.
$cssFilename
;
_bootstrap4_sass_compile
(
$css_filename
);
unset
(
$css
[
$originalCss
]);
if
(
isset
(
$css
[
$original_css
]))
{
$css
[
$css_path
.
'/'
.
$css_filename
]
=
$css
[
$original_css
];
$css
[
$css_path
.
'/'
.
$css_filename
][
'data'
]
=
$css_path
.
'/'
.
$css_filename
;
unset
(
$css
[
$original_css
]);
}
break
;
}
}
}
...
...
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