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

InlineCss not parsing @import "url" statements #196

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

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

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

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Was fixed in 0.10.19.x

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

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

  • Added labels: release-note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment