Comments (4)
those look awesome!!! please feel free to close this issue :)
from css-inline.
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.
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 fromextraCss
when usingpreserveMediaQueries
,preserveFontFaces
orpreserveKeyFrames
. Whentrue
order of preference to append the<style>
element is intohead
, thenbody
, then at the end of the document. When astring
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 totrue
.
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.
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)
- What to use instead of inline_style_tags? HOT 6
- MJS export for npm module HOT 12
- WASM/nodejs throws "Io Error: operation not supported on this platform" if HTML has link to google fonts api HOT 5
- Keep `@media` query CSS for responsive HOT 4
- Styles not extracted correctly in Nuxt > 3.8.0 HOT 5
- Release C bindings HOT 3
- Option to cache resolved stylesheets
- Does take classes in consideration or just depends on selectors of tag types? HOT 1
- Add support for :nth-child selector HOT 5
- Support `data-css-inline="keep"` to enforce keeping the style tag
- WASM Exception Thrown In 0.13.0 HOT 3
- Double quotes in font-family name break generated style attribute HOT 5
- Option to keep raw HTML tags structure HOT 3
- Error: Cannot resolve "./css-inline.android-arm-eabi.node" HOT 3
- Support for `@layer`? HOT 2
- JavaScript WASM broken Since 0.13.0 HOT 3
- Keep npm published versions up to date HOT 3
- Padding, marging has incorrect order while merging with inline HOT 4
- Ignore a HTML block
- Open Handle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from css-inline.