Giter Club home page Giter Club logo

Comments (4)

cheapsteak avatar cheapsteak commented on July 29, 2024 1

those look awesome!!! please feel free to close this issue :)

from css-inline.

Stranger6667 avatar Stranger6667 commented on July 29, 2024

Hi @cheapsteak !

I didn't think about it, but having such a feature seems perfectly reasonable to me :) Correct me if I am wrong, but to support your use case, it might be:

  • A InlineOptions option to disable "style" tag inlining;
  • A InlineOptions option with extra CSS to inline;

As far as I see, the extra CSS should be in the form of qualified rules as a single string, e.g. h1 {color: green}, is it in this way in mjml?
Also, from looking at the code sample you mentioned I am not sure what insertPreservedExtraCss option does? Could you, please, help me with that?

If the things above make sense, then I can implement that :) And I will appreciate if you can provide some input, expected output samples so I can include them to the test suite :)

Cheers

from css-inline.

cheapsteak avatar cheapsteak commented on July 29, 2024

A InlineOptions option to disable "style" tag inlining;
A InlineOptions option with extra CSS to inline;

yes that should work!

the extra CSS should be in the form of qualified rules as a single string, e.g. h1 {color: green}, is it in this way in mjml?

yup!

insertPreservedExtraCss

that's a "juice" parameter , i'll copy their description here :)

whether to insert into the document any preserved @media or @font-face content from extraCss when using preserveMediaQueries, preserveFontFaces or preserveKeyFrames. When true order of preference to append the <style> element is into head, then body, then at the end of the document. When a string the value is treated as a CSS/jQuery/cheerio selector, and when found, the <style> tag will be appended to the end of the first match. Defaults to true.

for emails, extra CSS passed in separately from the html that can't be inlined should probably be thrown away, which I guess is why mjml had disabled that :)

from css-inline.

Stranger6667 avatar Stranger6667 commented on July 29, 2024

Thanks! I implemented the abovementioned options - inline_style_tags & extra_css (in #46 and #48 ). Is there anything else I can do regarding this feature?

I think that a new release could be issued when #49 is done so you can directly use it as a replacement for juice :) What do you think?

from css-inline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.