When making my html emails do I have to inline my CSS? - sendgrid-templates

Please help. thanks.
idk icl because I see other people internally creating their css and i thought that wasnt optimal

It is better to inline CSS because of compatibility. You can check out: https://www.campaignmonitor.com/css/style-element/style-in-head/.
Here, we can see that the style tag is incompatible only with a few mobile clients. Based on your customer base, you can decide if you want to style tag in the head of emails

Related

How to style mgt components

I'm using the MGT with React. I am trying to style the component in the same fashion as the rest of my application (reactstrap).
I've found the custom CSS properties you can set, which has got me 90% of the way there, but I need to be able to adjust the margins of the control (margin-left: -3px) and I can't seem to do this no matter what I try.
I think the answer to my problem lies in using the templating functionality but the documentation is a bit lacking for this.
Any ideas where I should start with this? Am I on the right track? Does anyone know of an example of using templates with the PersonPicker component?
Without specifics, there definitely might some css properties that we haven't exposed yet. I don't think there would be any recommended code to use here, instead I'd highly suggest opening a an issue on our github repo as a feature request. We can then work with you on improving the toolkit with these properties.

How to create a living style guide with your own UI

I have created an website/application using Angular2. The infrastructure is all set, I have routing completed, sass being processed etc.
I have sections (components) on this website that will display current web standards for our designs (buttons, forms, copy). The purpose of this site is to give our developers a copy/paste solution for markup and sass.
We will most likely create our own css library but they will still need a good visual reference of what each class does and a copy/paste solution.
I know how to develop all the standards, what I don't know how to do is have the DOM display options for the user to copy/paste the code. I could manually enter the code into or tags but this will be hard to maintain and not very clean approach. I'd like to find some solution that will utilize my code and create these tags at run time.
Googling this question leads down the road of using living style guide generators, which i don't want to use... why? I like having the functionality of controlling my own layout and scaling my standards as I see fit with our own technology.
Any ideas?
After exploring this even further I ended circling yet again on documentation tools (KSS) where I would need to rebuild my entire style guide for this functionality using markdown and or JDOCs.
Solution!
Use CodePen, its free to signup however there are some nice to have features for a monthly fee. I easily created my code here using SASS, HTML and CSS libraries. CodePen has a great EMBED feature whereas I could copy/paste html or iframe right to my styleguide.
Problem is now solved, and we have have a dynamic Web & UI Styleguide.
Hope this method helps others in my situation.

WordPress 3.5 Media Manager: Is there a "good" way to add an additional select option within Create Gallery tab?

By good, I mean using hooks/filters.
Basically, by default the two options are Images and Uploaded to this page. I would like to add an additional option in there. I know how to add a new tab to the media manager (see here), but that doesn't achieve what I need.
I've been looking through the limited documentation on 3.5 and have found the media_view_strings/settings filters, but, based on what I can tell, neither could be used in this case. I've also done quite a bit of digging through the core source, but the number of files relating to the media uploader is daunting to say the least.
I thought about running JS after page load to modify the DOM and just add the extra select option in, but this seems very hackish and I'd like to avoid it if there is a better, more robust solution.
Any thoughts on the best way to approach this would be greatly appreciated!
Note: I didn't post this to the WordPress SE Site since it gets much less traffic and the questions tend to be much less programming-related.
Most of those select-dropdowns are from wp-includes/media-template.php, which has a lot of Underscore templating (<script type="text/html" tags), but few action hooks for php code. With Javascript you can bind the Backbone.js hooks for wp.media events, such as wp.media's open/close events. From such event you could grab that Images/uploaded-to-page selectbox with jQuery('.media-modal-content:visible .attachment-filters'), add item(s) and listeners as needed. I'm pretty sure there should be a much better Backbone.js-style solution, though.
Here is a tutorial by Shiba Shake on this subject ...
How to Expand the WordPress Media Manager Interface
Hope this is helpful to you!

Microsofts latest anti XSS Library for asp.net - 4.2.1 - Problems and Alternatives(?)

I have a problem using the their latest WPL v 4.2.1. The stripping of suspect HTML, javsacript and styling is so aggressive it strips out ALL the CSS.
I understand that CSS can be easily used to inject malicious javascript using URL references, but this also means im losing all the innocent styling that makes my content look readable. The last thing i want displayed on my aspx pages is boring 'plain' text.
My question: Is there another library on the market/the web which I can use which will not strip off my styling elements completely? By that i mean selectively removing only the possibly malicious attributes within the CSS.
I have tried searching but without much luck. If anybody knows of one, could you post the answer here please? I know the current source code can be modified but I'd really like to use an available project if there is one as i'm not very knowledgeable with cross site scripting.
Thanks a ton!

Adding a filter header row to ExtJS GridPanel

I know that it's possible to add a filter row UNDER the column title because I've seen it done with Coolite. But since I'm a total newbie with Sencha (ExtJS), I have trouble finding how to do it with the ExtJS.grid.GridPanel directly in the script. Would you point me in the right direction with some samples please ?
If possible, I would like to do so without plugins, but if there's one out there doing great and easy to use, I could change my mind.
Thanks !
Here you have a link to the GridHeaderFilters Plugin. There you have an easy example of how to use it.
And regarding your comment about trying to do this without a plugin I recommend you not to do it. Because this might seem like a easy code to write but I believe it is not. And that is why this plugin has hundreds of lines. I think this is not a plugin full of features that you won't use, this plugin just does the filtering the way you need it.
And as a final note, if you are expecting the exact same behavior as in this coolite example I think you are out of luck. Because if you get the javascript source code of that example and run it through jsbeautifier you will see that this example is not using any ExtJS plugin and is not a easy code as is using a really complex template for the headers.

Resources