Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining CSS #921

Closed
Benjaminsson opened this issue Jan 18, 2012 · 4 comments
Closed

Combining CSS #921

Benjaminsson opened this issue Jan 18, 2012 · 4 comments
Labels

Comments

@Benjaminsson
Copy link

I added the style style2.css to the CSS folder.
Put some styles in it.
added this tag right after the first CSS linkage:
<link rel="stylesheet" href="css/style2.css">
Added this line to "project.properties":
file.stylesheets = style2.css

"You can now add multiple stylesheets to the project (defined in the project.properties file) and they will be concatenated into 1 file, with any default stylesheets defined in the default.properties file being added at the end."

The result i expected considering the quote from the docs above was that the files style.css and style2.css would merge into the same file and get minified and that in index.html both the lines:
<link rel="stylesheet" href="css/style.css">
and
<link rel="stylesheet" href="css/style2.css">
would be removed and replaced with one tag looking like this:
<link rel="stylesheet" href="css/af328e9.css">

instead both files gets minified separately and only the first style.css gets the hash name. The first CSS link tag gets replaced with the hashed one but the second stays the same.

Off topic question/feature request that can be ignored: Is it possible to make the CSS part of the build script work in the same way as the Javascript do? Would be more consistent and easier to understand that way.

@necolas
Copy link
Member

necolas commented Jan 18, 2012

Off topic question/feature request that can be ignored: Is it possible to make the CSS part of the build script work in the same way as the Javascript do? Would be more consistent and easier to understand that way.

Yeah I opened a feature request for just that - #831. We're actually going to move the build script to a separate repo and some smart people are looking at reworking it entirely to include this functionality and a lot more.

@Benjaminsson
Copy link
Author

@necolas Looks awesome!
In the meantime, you'll just have too live without the merging of CSSs?

@necolas
Copy link
Member

necolas commented Jan 19, 2012

You should be able to use @import inlining within style.css to merge multiple files together.

@necolas
Copy link
Member

necolas commented Jan 24, 2012

OK I'm going to close this as @import inlining should already cater for it, and there's already a separate issue open about improving the way that you can choose how to concat CSS and JS files. Thanks.

@necolas necolas closed this as completed Jan 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants