w8tcha / bootstrapemail.net Goto Github PK
View Code? Open in Web Editor NEW.NET Version of Bootstrap stylesheet, compiler, and inliner for responsive and consistent emails with the Bootstrap syntax you know and love
License: MIT License
.NET Version of Bootstrap stylesheet, compiler, and inliner for responsive and consistent emails with the Bootstrap syntax you know and love
License: MIT License
In my project I noticed that tests sometimes give me file lock errors, I figured out it's because they are being run in parallel. Some of the template rendering in my production app can happen in parallel too, is this scenario supported by this library (or are there any plans to support it)?
Here's an example project
BootstrapEmailExample.zip
Hi! I'm trying to use this project for processing email templates at runtime. I'm getting this error whenever I create an instance of BootstrapEmail - "Unable to load DLL 'libsass64' or one of its dependencies: The specified module could not be found."
StackTrace:
System.TypeInitializationException
The type initializer for 'LibSass.Compiler.SassCompiler' threw an exception.
at LibSass.Compiler.SassCompiler..ctor(ISassOptions sassOptions)
at BootstrapEmail.Net.Compiler..ctor(String input, ConfigStore config, InputType type)
at BootstrapEmail.Net.BootstrapEmail.StringCompile(String input)
at BootstrapEmail.Net.BootstrapEmail.Compile(String input, String output, InputType type)
Is there a way to resolve this? Thanks!
Hi! Can you please direct me or give me an example how to use sass files to add new css classes?
I want to add a new background color task using the sass background-color-util. I believe I can add another sass directory and the files will be included and compiled. How can I do that?
Thanks!
Hi!
In the new 1.4.3 version the inline styles are not being generated at all. Here's a comparison with the web version (I haven't included html previously generated with the 1.4.2 version, but it did have inline styles).
result-test.zip
One more catch - original style elements in the head are not being removed in the lib, but are removed in the web.
Thanks!
Hi!
I've been trying to use the library in docker, I get this error when running the container:
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'start')
at BootstrapEmail.Net.Compiler.GetEmbeddedCoreFiles()
at BootstrapEmail.Net.Compiler..ctor(String input, ConfigStore config, InputType type)
at BootstrapEmail.Net.BootstrapEmail.FileCompile(String relativeFilePath, String savePath)
at BootstrapEmail.Net.BootstrapEmail.Compile(String input, String output, InputType type)
at Program.<Main>$(String[] args) in /app/Program.cs:line 7
Here's a project. Run the docker.ps1 file in the powershell.
BootstrapEmailExample.zip
Hi!
When defining custom classes with the background color and applying them to the body, the table generated from the body has wrong background color. Here's an example and comparison with the web version:
result-test.zip
In the example there's grey background defined as a class in styles and applied to the body. There's also a white card inside.
The code generated from the web is correct, and shows grey background and white card. The code generated with this library has white background around the card too. That happens because the table inside the body has explicit white background being set in the table attributes and style.
Hi!
Tried the sass precompilation approach recently, I get errors when I try to do multiple renderings at the same time, here's an example.
BootstrapEmailExample.zip
The error is: The process cannot access the file 'D:\Projects\BootstrapEmailExample\ConsoleExample\bin\Debug\net8.0\core\bootstrap-email.scss' because it is being used by another process.
I also noticed that if the css files are not found then the usual sass compilation takes place. That can be misleading, can there be a switch that turns off sass in the library, and in case the css files are not found it throws an error? That will help in debugging.
Thanks!
Hi!
This library uses file caches for styles that it compiles and creates in the runtime. I presume it was made that way for cli usage primarily, which makes total sense. Unfortunately in my setup it's not possible to precompile templates, as they are rendered with razor components, with layouts and child components. However using cli partially, to precompile sass would be a great thing. I wonder if it's possible with this library.
Thanks!
Hi!
I've noticed there are some differences and errors when compiling templates in this project vs the bootstrapemail.com website. Here's an example, with source html, a result from bootstrapemail.com website, and an html result generated with this library.
result-test.zip
Hope that'll be helpful. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.