Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

InlineCss not parsing @import "url" statements #196

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 8 comments
Closed

InlineCss not parsing @import "url" statements #196

GoogleCodeExporter opened this issue Apr 6, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

I have a typo3 website where you can find :

<link rel="stylesheet" type="text/css" 
href="fileadmin/templates/mysite.com/css/style.css" media="all" />

style.css contains :

@import "structure.css";
@import "menu.css "; 
@import "content-style.css";
@import "submenu.css";
@import "top.css";
@import "footer.css";
@import "recherche.css";
@import "dropdown-sitemap.css";
@import "powermail.css";
@import "tt_news.css";

textarea.powermail_solutiondetlphonie
{
    display:normal;
}

.powermail_pagebrowser
{
    display:none;
}

.tx_powermail_pi1_fieldwrap_html_checkbox_title
{
    font-weight:bold;
}

mod_page speeds decides to inline the content of this css file in the page as 
is ; however it should add the path of the original css before as then the css 
file cannot be found...

I.e it should write :

@import "fileadmin/templates/mysite.com/css/structure.css";
@import "fileadmin/templates/mysite.com/css/menu.css "; 
@import "fileadmin/templates/mysite.com/css/content-style.css";
@import "fileadmin/templates/mysite.com/css/submenu.css";
@import "fileadmin/templates/mysite.com/css/top.css";
@import "fileadmin/templates/mysite.com/css/footer.css";
@import "fileadmin/templates/mysite.com/css/recherche.css";
@import "fileadmin/templates/mysite.com/css/dropdown-sitemap.css";
@import "fileadmin/templates/mysite.com/css/powermail.css";
@import "fileadmin/templates/mysite.com/css/tt_news.css";

textarea.powermail_solutiondetlphonie
{
    display:normal;
}

.powermail_pagebrowser
{
    display:none;
}

.tx_powermail_pi1_fieldwrap_html_checkbox_title
{
    font-weight:bold;
}

instead of :

@import "structure.css";
@import "menu.css "; 
@import "content-style.css";
@import "submenu.css";
@import "top.css";
@import "footer.css";
@import "recherche.css";
@import "dropdown-sitemap.css";
@import "powermail.css";
@import "tt_news.css";

textarea.powermail_solutiondetlphonie
{
    display:normal;
}

.powermail_pagebrowser
{
    display:none;
}

.tx_powermail_pi1_fieldwrap_html_checkbox_title
{
    font-weight:bold;
}

Original issue reported on code.google.com by jernstje...@gmail.com on 26 Jan 2011 at 8:40

@GoogleCodeExporter
Copy link
Author

Thanks for the detailed bug report.  In the short term we'll do a quick fix to 
stop inlining css files containing imports, as that's broken.

We'll then leave this Issue open as an enhancement to add parsing & 
absolutification of the import paths.

Original comment by jmara...@google.com on 26 Jan 2011 at 1:15

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

FYI, for a quick work-around. This will work correctly if you change all lines 
like

@import "foo.css"

to:

@import url(foo.css)

-Shawn

Original comment by sligocki@google.com on 26 Jan 2011 at 5:30

@GoogleCodeExporter
Copy link
Author

I think the same issue was reported on Twitter and detailed in this blog: 
http://pyrocms.com/forums/topics/view/1919/

Original comment by jmara...@google.com on 11 Feb 2011 at 5:15

@GoogleCodeExporter
Copy link
Author

I'm taking this.

Original comment by sligocki@google.com on 24 Feb 2011 at 10:49

  • Changed title: CombineCss not parsing @import "url" statements

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 24 Feb 2011 at 11:25

  • Changed title: InlineCss not parsing @import "url" statements

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 18 Oct 2011 at 2:17

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Was fixed in 0.10.19.x

Original comment by morlov...@google.com on 24 Jan 2012 at 10:31

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by matterb...@google.com on 25 Jan 2012 at 1:24

  • Added labels: release-note

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

No branches or pull requests

1 participant