I have a D 8.1.8 site and I installed AA; Did the regular profiling I did in D7 but saw no option to inline the css.

If it was removed, can you please explain why and what is a decent simple alternative just for the inlining part of course?

Thanks,

Comments

Benia created an issue. See original summary.

Benia’s picture

Issue summary: View changes
Benia’s picture

Issue summary: View changes
NickDickinsonWilde’s picture

Inline css/js was removed in Drupal core for 8.x - https://www.drupal.org/node/2382533
I'm not sure of any current modules recreating that functionality.

Benia’s picture

Why was it removed?... I think it's a great feature and one of the last hoped for many people storing on shared servers...

NickDickinsonWilde’s picture

I'm not 100% sure - I mean I know some but after the fact reading only; that was a core decision and I don't fully remember all the reasons.

NickDickinsonWilde’s picture

Status: Active » Closed (works as designed)
mikeytown2’s picture

Title: No option to inline CSS in AA8 ? and another thing » Allow for inline css/js
Category: Support request » Feature request
Priority: Normal » Minor
Status: Closed (works as designed) » Postponed

Change happened in this issue #2382533: Attach assets only via the asset library system

Agreed on removing inline js. When I've done site audits a very common problem is a poorly written contrib or custom module sticking inline js on the page instead of using Drupal.settings. Then that inline js because it is added in amongst all the other js on the page results in two aggregates (one before the inline js, one after) where there originally would have been one. So supporting that as a regular asset type makes it very easy to mess up the front end performance of a site.

Main reason they got rid of it in core is it was causing issues; I objected to this but it looks like I wasn't heard. Inlining critical css will require this, so this will need to happen sometime in the future... we can wait on this.

NickDickinsonWilde’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Assigned: Unassigned » NickDickinsonWilde
Status: Postponed » Needs work

This will actually be fairly easy to do in 8.x-3.x.
It'll probably go in 8.x-3.1

rviner’s picture

Was just wondering if there's still a plan to add this back in soon?

NickDickinsonWilde’s picture

Yes, there is. Soon is nebulous since I haven't expressly scheduled it but I think it's actually now very soon that I'll get to it.

FiNeX’s picture

Hi, did you see the "Critical CSS" module (https://www.drupal.org/project/critical_css)? It looks interesting.