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

Option to exclude specific stylesheets #118

Closed
oskarrough opened this issue Jan 25, 2016 · 3 comments
Closed

Option to exclude specific stylesheets #118

oskarrough opened this issue Jan 25, 2016 · 3 comments

Comments

@oskarrough
Copy link
Contributor

Hi, critical automatically moves all stylesheets found into a <noscript> block and loads them async via loadCSS.

How would you exclude a specific stylesheet from this logic? Or only include a specific stylesheet? I understand Penthouse does this but critical is easier to use as it can inline everything.

@bezoerb
Copy link
Collaborator

bezoerb commented Feb 5, 2016

@oskarrough this is currently not possible with critical. inline-critical already has an option for this but there's no way to pass this configuration value from critical at the moment.
I'm considering an inlineOptions property which will be passed directly to inline-critical.

@bezoerb
Copy link
Collaborator

bezoerb commented Jul 1, 2017

would be possible after #178 has landed

critical.generate({
    base: 'test/',
    src: 'index.html',
    dest: 'styles/styles.min.css',
    minify: true,
    width: 1300,
    height: 900
    inline: { ignore: /ignored\.css/ }, 
});

@bezoerb
Copy link
Collaborator

bezoerb commented Nov 30, 2018

Closing this due to inactivity. Feel free to open an issue for inline-critical if there's anything left to fix.

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

No branches or pull requests

2 participants