Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Use gulp-concat-css to bubble up @import statements #343

Merged
merged 1 commit into from
Nov 20, 2015

Conversation

jeroennoten
Copy link
Contributor

Using gulp-concat-css instead of gulp-concat makes sure that @import statements are bubbled up to the top of the file. This is necessary because @import statements that are not at the top of the file are ignored by the browser (as per the standard). The options {rebaseUrls: false, inlineImports: false} makes this change non-breaking.

I discovered this issue when I was concatenating vendor css files where one of them had an @import statement to import a Google Font:

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);

This ended up somewhere in the middle of the output file and was ignored by the browser. gulp-concat-css takes care of this problem.

JeffreyWay added a commit that referenced this pull request Nov 20, 2015
Use gulp-concat-css to bubble up @import statements
@JeffreyWay JeffreyWay merged commit 1a2e65d into laravel:master Nov 20, 2015
@JeffreyWay
Copy link
Contributor

This PR messed up CSS sourcemaps so I reverted it.

748d2af

You can resubmit if you fix that.

@jeroennoten
Copy link
Contributor Author

Okay sorry for the issues. I will look into a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants