Terraform Module for Automated MongoDB Backup

MongoDB is one of the most widely used databases out there, and creating backups for it is a crucial, yet routine task not to be taken lightly. This is why we decided to automate the process.

Manual backups are utterly outdated, not to mention this means keeping in mind all the peculiarities and tagging the copies by hand. Automated backup requires using certain libraries that are not present by default, and the DevOps team will most likely learn of this the hard way.

Prometheus Metrics for MicroProfile Microservices in Istio

For cloud-native applications, Kubernetes and Istio deliver a lot of important functionality out of the box, for example, certain metrics, which are independent from the actual service implementations, can be collected automatically.

However, other metrics are application specific, for example, how many times certain methods have been invoked and how long they take. Eclipse MicroProfile allows Java developers to easily expose these metrics. Check out the list of available Java annotations.

Powers of Two

Refactoring is one of those words that evokes fear in the eyes of many folks, from developers to product owners and everyone in between. It may as well be a four-letter word in many ways. It's also something that we talk about quite a bit around here because, like books on the topic, where to start with one, and the impact of letting technical debt pile up.

Ben Rady has thoughts on refactoring as well, but in the context of pair programming:

We pair for about 6 hours a day, every day. Everything that's on the critical path is worked on in a pair. Always. Our goal is always to get the thing we're working on to production as fast as we responsibly can, and the best way I've found to that is with a pair.

Ben then dives into the process of working alongside others and how to ship software with that approach, a lot of which I think relates to front-end development best practices, too. But I also love how punk rock this team is, as they appear not to develop software with a backlog or a ton of meetings for managing their projects:

No formal backlog. We have three states for new features. Now, next, and probably never. Whatever we're working on now is the most valuable thing we can think of. Whatever's next is the next most valuable thing. When we pull new work, we ask "What's next?" and discuss. If someone comes to us with an idea, we ask "Is this more valuable that what we were planning to do next?" If not, it's usually forgotten, because by the time we finish that there's something else that's newer and better. But if it comes up again, maybe it'll make the cut.

I wonder how much time a year they save without having to argue about stories and points and whether this one tiny feature is more important than this other one. Anyway, I find all of this stuff thoroughly inspiring.

Direct Link to ArticlePermalink

The post Powers of Two appeared first on CSS-Tricks.

New Gutenberg Playground Offers a Standalone Version of the Editor for Testing Outside the WordPress Admin

The Gutenberg team merged a pull request three days ago that adds a local “playground” development environment for testing outside of the WordPress admin. Riad Benguella, the technical lead for Gutenberg phase 2, said that the playground could grow over time to contain “more than just a standalone version of the editor” and could become a way for developers to test out components in isolation. He shared a screenshot of the playground in action:

During Tuesday’s JavaScript chat meeting, Benguella elaborated on the playground’s intended use.

“Now that we’re expanding the usage of Gutenberg outside of the edit-post and also talking about cross-CMS usage and external usage (in the broad sense), we need a way to run the block editor in a context independent from the WordPress Admin. This means no WordPress admin styles, no API.”

Testing Gutenberg in the playground’s “no-context” mode allows developers to ensure their components don’t rely on WP-Admin styles to be present. Benguella said it demonstrates how core blocks can be used without requiring a post object, which will be useful for architecting the widgets screen.

“This playground could evolve to contain examples of our reusable components (think Storybook),” Benguella said. “It could also serve as a contributor tool. For example, we could include a way to search for selectors.”

The playground was just merged this week, so contributors are working on better documentation. In the meantime, check out the PR for more details on how to test it.

Cassidy at T3chFest and on the React Podcast

Our very own Cassidy Williams in Spain at T3chFest! How cool. As so many people have done, Cassidy picked some gorgeous designs from Dribbble to rebuild. She had the audience choose, and then live coded that sucker in professor mode!


And don't miss Cassidy and Michael Chan chatting over on the React Podcast Episode 40:


Can't get enough? Cassidy and Marie just talked about our Babel 7 upgrade over on CodePen Radio.

The post Cassidy at T3chFest and on the React Podcast appeared first on CodePen Blog.

The Good, the Bad, and the Ugly? 10 Features of a Good Logo

What is a logo? Basically, it is a symbol, a text, or a combination of the two that helps us identify a brand. The latter is not just a logo, it is the general way in which customers perceive you. This includes the way of communication, promotional materials, images, products or services, physical stores or online stores, and more.

Why is it important to have a logo? Representing the “face” of your business, it is necessary for the purpose of identifying, differentiating competition, constant communication and loyalty.

With that in mind, let’s talk about 10 of the biggest features that should go into a logo:

Represents the niche and the target audience

The features of a logo must depend on the niche and the target audience accordingly. That’s why a marketing brief is the basis for creating a good logo.

For a specific example, let’s use a heavy metal band’s logo. The band’s logo might look ugly and grotesque to some, but it’s exactly what it should be for their target audience.

It is adaptable

Good Logo

A good logo can be easily used in the online environment, embroidery, huge banners, small labels, business cards, bottles, you name it. Keep in mind that you need a logo in vector format, not just .png or .jpg, because this format offers scalability. Do not forget to always ask the graphic designer.

In this regard, you really should consider working with a graphic designer. Remember, your logo is the face of your company. It’s the thing that almost every customer sees before they even know what you do as a company. Spend the extra time and money to get it right the first time, and avoid having to spend more time and money in the future.

It differentiates you from the competition

Good Logo

First, to differentiate yourself, you have to know your competition. Considering the multitude of existing business and logos, it is extremely important to assume your own identity and not to copy it from others. Of course, in this case, differentiation must target the niche and the target audience. To continue with the previous example, heavy metal logos do not fit a law firm.

It is timeless

Good Logo

Trends come and go, but your logo does not have to be based on time preferences, but it has to pass the test of time. Of course, many businesses change their logos through rebranding campaigns, because they have changed their values ​​or just because they originally made a trendy logo.

A good example of a timeless logo is the Coca-Cola logo. Since its creation in 1887, it’s kept roughly the same design. It’s easily recognized, and it stays up-to-date.

It’s memorable

The memorable character of a logo can be provided by simplicity, uniqueness, color, hidden elements or many other features. The customer will choose a brand they know and trust, and ultimately become faithful to your brand.

Leave a lasting impression, and gain a lasting customer.

It’s read easily

Good Logo

Handwriting fonts can be beautiful for a particular audience, but they are often hard to read and therefore hard to remember and perceive. If a font is not readable at a comfortable size, how does it look on a business card or a mobile site?

Again, keep it simple and clean, and you’ll avoid this mistake.

It doesn’t describe the business

Good Logo

Just because you deal with car production does not mean that your car needs a car illustration. Of all existing car brands, none of them include the main subject of their business (except those that make toy cars).

Many graphic designers (or business owners) tend to make the logo descriptive. This might not be considered a mistake, but, more often than not, it comes off as a generic looking logo. It usually limits you to certain services, which can prevent the expansion of your business.

It’s smart

A visible concept is not a must, but it’s a plus . A logo that contains a surprise item or something that needs to be discovered generates interest (have you ever noticed the arrow in the FedEx logo?). But one element is more than enough. Many times, designers take this idea too far, and overcomplicate the logo.

Good Logo

Contains the appropriate fonts and colors

Fonts and colors are excellent forms of communication. For example, a handwritten font is more feminine and personal, usually unmatched in a corporate logo. Every color has its psychology, which is dependent on culture. In this sense, have you ever wondered why most corporations have the blue logo? The answer is simple: because blue inspires confidence and is a favorite color of both genders.

Good Logo

It’s not complicated

Too many fonts, colors, elements, symbols, or slogans can complicate the design. This leads to a hard-to-remember and unidentifiable logo.

The summary

Now you know what a logo is, why it is important to have one, and what  the characteristics that can fit it into the category of good ones are.

There are lots of examples of great logos out there. I’m sure you can think of a few right off the top of your head right now. But, for every good example of a logo, there’s at least one bad example. Avoid being one of those bad examples, and stick to these 10 features.

Read More at The Good, the Bad, and the Ugly? 10 Features of a Good Logo

How to get your online business noticed

However, to be able to enjoy all of these perks, it means that you need to be generating some serious revenue from your online sales in order to ultimately support you without any additional income to prop you up along the way. If you want to move stock, you need to get noticed by your target audience and convince them you are the business selling something that they just can’t get anywhere else.

To get you started and help you boost your profit margins, this handy guide is going to take you through three essential things you need to think about and do to be successful in the business world of today.

Have striking visuals

With social media becoming an ever-present part of modern life, the focus on visual marketing has never been more intense. With platforms such as Instagram relying solely on the sharing of images to convey information, it is crucial that whatever visual material you are using to promote your brand and products is of the highest quality.

With this in mind, a great idea is to create your logo online for free and start building your brand identity. By choosing to use an online logo maker, you are already saving money and time on getting a commission done, and logo makers let you create a final design that looks polished and professional without having to waste your money on a graphic design software.

Think differently about your products

Online businesses can run in a variety of ways, but one of the most popular is selling handmade goods. When you are making the products you are selling yourself it is important that you consider what materials you are using.

For example, out of the many reasons you should use fair trade goods, one of them is that it has a widespread appeal to consumers. Knowing that the products you are selling are ethical and helping people will make your target audience want to spend their money on your goods because they know you are a responsible business person.

Spread things out

The internet is second to none when you want to reach out to your target audience, wherever they may be. One of the things you can do to make this work even more to your advantage is to spread out where you are selling your products (and this is easy to do considering how you can synchronize your inventory across platforms).

By selling your products across multiple online marketplaces, you will be reaching more people than ever and continuously increasing your likelihood of making more sales. If you couple this with expanding to include international postage, then you will be able to have your products distributed all over the world and have enough money to live a rather charmed life.

This is a guest post by Fatima Ishfaq.

Collective #503




C503_mosaic

Mosaic

Mosaic is a declarative front-end JavaScript library for building user interfaces.

Check it out


C503_neort

NEORT (Beta)

NEORT is digital art platform for creators to share artworks and learn the skills beyond technology.

Check it out



C503_booleangame

The Boolean Game

A game for learning how to use boolean operations in Adobe Illustrator, Sketch, Figma, and other vector editors.

Play it














C503_indigo

indigo-player

A highly extensible, modern, TypeScript video player with support for the most popular stream formats, subtitles, out-of-the-box advertising, picture in picture, thumbnails and more.

Check it out






Collective #503 was written by Pedro Botelho and published on Codrops.

CSS Houdini Could Change the Way We Write and Manage CSS

CSS Houdini may be the most exciting development in CSS. Houdini is comprised of a number of separate APIs, each shipping to browsers separately, and some that have already shipped (here's the browser support). The Paint API is one of them. I’m very excited about it and recently started to think about how I can use it in my work.

One way I’ve been able to do that is to use it as a way to avoid reinventing the wheel. We’ll go over that in this post while comparing it with methods we currently use in JavaScript and CSS. (I won’t dig into how to write CSS Houdini because there are great articles like this, this and this.)

Houdini brings modularity and configurations to CSS

The way CSS Houdini works brings two advantages: modularity and configurability. Both are common ways to make our lives as developers easier. We see these concepts often in the JavaScript world, but less-so with CSS world… until now.

Here’s a table the workflows we have for some use cases, comparing traditional CSS with using Houdini. I also added JavaScript for further comparison. You can see CSS Houdini allows us to use CSS more productively, similar to how the JavaScript world had evolved into components.

Traditional CSS CSS Houdini JavaScript
When we need a commonly used snippets Write it from scratch or copy-paste from somewhere. Import a worklet for it. Import a JS library.
Customize the snippet for the use case Manually tweak the value in CSS. Edit custom properties that the worklet exposes. Edit configs that the library provides.
Sharing code Share code for the raw styles, with comments on how to tweak each piece. Share the worklet (in the future, to a package management service) and document custom properties. Share the library to a package management service (like npm) and document how to use and configure it.

Modularity

With Houdini, you can import a worklet and start to use it with one line of code.

<script>
  CSS.paintWorklet.addModule('my-useful-paint-worklet.js');
</script>

This means there’s no need to implement commonly used styles every time. You can have a collection of your own worklets which can be used on any of your projects, or even shared with each other.

If you're looking for modularity for HTML and JavaScript in additional to styles, then web components is the solution.

It’s very similar to what we already have in the JavaScript world. Most people won’t re-implement commonly used functions, like throttling or deep-copying objects. We simply import libraries, like Lodash.

I can imagine we could have CSS Houdini package management services if the popularity of CSS Houdini takes off, and anyone could import worklets for interesting waterfall layouts, background patterns, complex animation, etc.

Configurability

Houdini works well with CSS variables, which largely empowers itself. With CSS variables, a Houdini worklet can be configured by the user.

.my-element {
  background-image: paint(triangle);
  --direction: top;
  --size: 20px;
}

In the snippet, --direction and --size are CSS variables, and they’re used in the triangle worklet (defined by the author of the triangle worklet). The user can change the property to update how it displays, even dynamically updating CSS variables in JavaScript.

If we compare it to what we already have in JavaScript again, JavaScript libraries usually have options that can be passed along. For example, we can pass values for speed, direction, size and so on to a carousel library to make it perform the way we want. Offering these APIs at the element level in CSS is very useful.

A Houdini workflow makes my development process much more efficient

Let’s see a complete example of how this whole thing can work together to make development easier. We’ll use a tooltip design pattern as an example. I find myself using this pattern often in different websites, yet somehow re-implement for each new project.

Let’s briefly walk through my old experience:

  1. OK, I need a tooltip.
  2. It’s a box, with a triangle on one side. I’ll use a pseudo-element to draw the triangle.
  3. I can use the transparent border trick to draw the triangle.
  4. At this time, I most likely dig up my past projects to copy the code. Let me think… this one needs to point up, which side is transparent?
  5. Oh, the design requires a border for the tooltip. I have to use another pseudo-element and fake a border for the pointing triangle.
  6. What? They decide to change the direction of the triangle?! OK, OK. I will tweak all the values of both triangles...

It’s not rocket science. The whole process may only take five minutes. But let’s see how it can be better with Houdini.

I built a simple worklet to draw a tooltip, with many options to change its looks. You can download it on GitHub.

Here’s my new process, thanks to Houdini:

  1. OK, I need a tooltip.
  2. I’ll import this tooltip worklet and use it.
  3. Now I’ll modify it using custom properties.
<div class="tooltip-1">This is a tip</div>
<script>CSS.paintWorklet.addModule('my-tooltip-worklet.js')</script>
<style>
.tooltip-1 {
  background-image: paint(tooltip);
  padding: calc(var(--triangle-size) * 1px + .5em) 1em 1em;
  --round-radius: 0;
  --background-color: #4d7990;
  --triangle-size: 20;
  --position: 20;
  --direction: top;
  --border-color: #333;
  --border-width: 2;
  color: #fff;
}
</style>

Here’s a demo! Go ahead and play around with variables!

CSS Houdini opens a door to modularized, configurable styles sharing. I look forward to seeing developers using and sharing CSS Houdini worklets. I’m trying to add more useful examples of Houdini usage. Ping me if you have ideas, or want to contribute to this repo.

The post CSS Houdini Could Change the Way We Write and Manage CSS appeared first on CSS-Tricks.

The Complete Guide to SEO for Images

Image optimization SEO isn’t what it used to be. Google is no longer like a toddler you can entertain with a picture book with basic words. Oh no, we’re dealing with a sophisticated teenager, who not only wants a deeper meaning but also to experience the thrill of speed. And your photos better be, like, […]

Web Design & Development Games to Test Your Skills

There are a ton of ways to learn web design and development. Some people prefer video courses, while others love reading books and webpages and applying the knowledge themselves.

Another way to learn is through online games! These will test your design skills, correct you when you’re wrong, and teach you basic concepts. If you love learning through doing, make sure to try these games!

Can’t Unsee

Can't Unsee

This game walks you through various simple design choices, prompting you to pick the one that looks correct and explaining why one is wrong and one is right. You can click a button to directly compare the images, making it easy to understand the difference. This will test your eye for subtle designs. At the end, see how you rank against other players!

Kern Type

Kern Type

Kerning is the spacing between letters, and an important skill for typographers and designers to learn. This kerning minigame will let you drag around the letters, then compare them to the solutions of a pro designer.

Shape Type

Shape Type

Another one for typographers, Shape Type tests your ability to accurately and beautifully shape letters in a design. You can easily compare your work to the designer’s with fluid transition animations that show you where you might have gone wrong.

The Bezier Game

The Bezier Game

If you make vector graphics, fonts, or CSS animations, you might have encountered Bezier curves. The Bezier Game will help teach you to work with this tool by taking you through various shapes, lines, and circles to fill out with curves. By the end you should have a better understanding of how Bezier curves work.

Color

Color

Ready to brush up on your color identification skills? This tests your ability to distinguish hues, saturation, complementary, analogous, triadic, and tetradic colors.

Pixactly

Pixactly

How good are you at measuring pixels by instinct? Pixactly helps you measure lengths and widths in pixels by prompting you to draw boxes of a specified height. Anyone who works with HTML and CSS will like this tool.

Hex Invaders

Hex Invaders

Do you know your hex codes? With all the online hex generator tools, many people neglect the learning their hex codes, but it’s still a good skill to have. Hex Invaders teaches you hex color codes by having you shoot the alien that corresponds to the color code shown on the screen.

Flexbox Froggy

Flexbox Froggy

Time to brush up on some CSS. With the justify-content property, you need to guide the frogs to their lily pads, all while learning more about CSS in real time. With twenty-four levels, you’ll come out of this with a full understanding of this CSS code.

Flexbox Defense

Flexbox Defense

Still having trouble with flexboxes? Flexbox Defense is a tower defense game where you must position your towers using CSS. After playing Flexbox Froggy, reinforce your skills with this more difficult game.

Grid Garden

Grid Garden

Here’s a relaxing game that will teach you how to use CSS Grid, specifically the grid-column-start property. Grow your own carrot garden, water plants, kill weeds, and learn new CSS tricks and tips in this unorthodox gardening game.

Flukeout

Flukeout

Ready to learn about CSS Selectors? Use the code window to select the correct objects and learn how to select them in all kinds of situations and unique placements. This one is great for people who are new to CSS.

Learning Design with Online Games

Whether you’re a brand-new designer/developer or just brushing up on what you’ve learned, online educational games are a great way to cement your skills. It’s always good to bring a little fun into your learning process. Let us know which game was your favorite!

Jetpack Gutenberg Blocks

I remember when Gutenberg was released into core, because I was at WordCamp US that day. A number of months have gone by now, so I imagine more and more of us on WordPress sites have dipped our toes into it. I just wrote about our first foray here on CSS-Tricks and using Gutenberg to power our newsletter.

Jetpack, of course, was ahead of the game. Jetpack adds a bunch of special, powerful blocks to Gutenberg that it's easy to see how useful they can be.

Here they are, as of this writing:

Maps! Subscriptions! GIFs! There are so many good ones. Here's a look at a few more:

The form widget, I hear, is the most popular.

You get a pretty powerful form builder right within your editor:

Instant Markdown Processing

Jetpack has always enabled Markdown support for WordPress, so it's nice that there is a Markdown widget!

PayPal Selling Blocks

There is even basic eCommerce blocks, which I just love as you can imagine how empowering that could be for some folks.

You can read more about Jetpack-specific Gutenberg blocks in their releases that went out for 6.8 and 6.9. Here at CSS-Tricks, we use a bunch of Jetpack features.

The post Jetpack Gutenberg Blocks appeared first on CSS-Tricks.

A Gutenburg-Powered Newsletter

I like Gutenberg, the new WordPress editor. I'm not oblivious to all the conversation around accessibility, UX, and readiness, but I know how hard it is to ship software and I'm glad WordPress got it out the door. Now it can evolve for the better.

I see a lot of benefit to block-based editors. Some of my favorite editors that I use every day, Notion and Dropbox Paper, are block-based in their own ways and I find it effective. In the CMS context, even moreso. Add the fact that these aren't just souped-up text blocks, but can be anything! Every block is it's own little configurable world, outputting anything it needs to.

I'm using Gutenberg on a number of sites, including my personal site and my rambling email site, where the content is pretty basic. On a decade+ old website like CSS-Tricks though, we need to baby step it. One of our first steps was moving our newsletter authoring into a Gutenberg setup. Here's how we're doing that.

Gutenberg Ramp

Gutenberg Ramp is a plugin with the purpose of turning Gutenberg on for some areas and not for others. In our case, I wanted to turn on Gutenberg just for newsletters, which is a Custom Post Type on our site. With the plugin installed and activated, I can do this now in our functions.php:

if (function_exists('gutenberg_ramp_load_gutenberg')) {
  gutenberg_ramp_load_gutenberg(['post_types' => [ 'newsletters' ]]);
}

Which works great:

Classic editor for posts, Gutenberg for the Newsletters Custom Post Type

We already have 100+ newsletters in there, so I was hoping to only flip on Gutenberg over a certain date or ID, but I haven't quite gotten there yet. I did open an issue.

What we were doing before: pasting in HTML email gibberish

We ultimately send out the email from MailChimp. So when we first started hand-crafting our email newsletter, we made a template in MailChimp and did our authoring right in MailChimp:

The MailChimp Editor

Nothing terrible about that, I just much prefer when we keep the clean, authored content in our own database. Even the old way, we ultimately did get it into our database, but we did it in a rather janky way. After sending out the email, we'd take the HTML output from MailChimp and copy-paste dump it into our Newsletter Custom Post Type.

That's good in a way: we have the content! But the content is so junked up we can basically never do anything with it other than display it in an <iframe> as the content is 100% bundled up in HTML email gibberish.

Now we can author cleanly in Gutenberg

I'd argue that the writing experience here is similar (MailChimp is kind of a block editor too), but nicer than doing it directly in MailChimp. It's so fast to make headers, lists, blockquotes, separators, drag and drop images... blocks that are the staple of our newsletter.

Displaying the newsletter

I like having a permanent URL for each edition of the newsletter. I like that the delivery mechanism is email primarily, but ultimately these are written words that I'd like to be a part of the site. That means if people don't like email, they can still read it. There is SEO value. I can link to them as needed. It just feels right for a site like ours that is a publication.

Now that we're authoring right on the site, I can output <?php the_content() ?> in a WordPress loop just like any other post or page and get clean output.

But... we have that "old" vs. "new" problem in that old newsletters are HTML dumps, and new newsletters are Gutenberg. Fortunately this wasn't too big of a problem, as I know exactly when the switch happened, so I can display them in different ways according to the ID. In my `single-newsletters.php`:

<?php if (get_the_ID() > 283082) { ?>

  <main class="single-newsletter on-light">
    <article class="article-content">
      <h1>CSS-Tricks Newsletter #<?php the_title(); ?></h1>
      <?php the_content() ?>
    </article>
  </main>
  
<?php } else { // Classic Mailchimp HTML dump ?>

  <div class="newsletter-iframe-wrap">
    <iframe class="newsletter-iframe" srcdoc="<?php echo htmlspecialchars(get_the_content()); ?>"></iframe>
  </div>

<?php } ?>

At the moment, the primary way we display the newsletters is in a little faux phone UI on the newsletters page, and it handles both just fine:

Old and new newsletters display equally well, it's just the old newsletters need to be iframed and I don't have as much design control.

So how do they actually get sent out?

Since we aren't creating the newsletters inside MailChimp anymore, did we have to find another way to send them out? Nope! MailChimp can send out a newsletter based on an RSS feed.

And WordPress is great at coughing up RSS feeds for Custom Post Yypes. You can do...

/feed/?post_type=your-custom-post-type

But... for us, I wanted to make sure that any of those old HTML dump emails never ended up in this RSS feed, so that the new MailChimp RSS feed would never see them an accidentally send them. So I ended up making a special Page Template that outputs a custom RSS feed. I figured that would give us ultimate control over it if we ever need it for even more things.

<?php
/*
Template Name: RSS Newsletterss
*/

the_post();
$id = get_post_meta($post->ID, 'parent_page_feed_id', true);

$args = array(
  'showposts' => 5,
  'post_type'  => 'newsletters',
  'post_status' => 'publish',
  'date_query' => array(
     array(
      'after'     => 'February 19th, 2019'
    )
  )
);

$posts = query_posts($args);

header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
?>

<rss version="2.0"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  <?php do_action('rss2_ns'); ?>>

<channel>
  <title>CSS-Tricks Newsletters RSS Feed</title>
  <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
  <link><?php bloginfo_rss('url') ?></link>
  <description><?php bloginfo_rss("description") ?></description>
  <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
  <language><?php echo get_option('rss_language'); ?></language>
  <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
  <sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>

  <?php do_action('rss2_head'); ?>

  <?php while( have_posts()) : the_post(); ?>

    <item>
      <title><?php the_title_rss(); ?></title>
      <link><?php the_permalink_rss(); ?></link>
      <comments><?php comments_link(); ?></comments>
      <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
      <dc:creator><?php the_author(); ?></dc:creator>
  <?php the_category_rss(); ?>
      <guid isPermaLink="false"><?php the_guid(); ?></guid>

      <description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>

      <content:encoded><![CDATA[<?php the_content(); ?>]]></content:encoded>

      <wfw:commentRss><?php echo get_post_comments_feed_link(); ?></wfw:commentRss>
      <slash:comments><?php echo get_comments_number(); ?></slash:comments>

      <?php rss_enclosure(); ?>
      <?php do_action('rss2_item'); ?>

    </item>

  <?php endwhile; ?>

</channel>

</rss>

Styling...

With a MailChimp RSS campaign, you still have control over the outside template like any other campaign:

But then content from the feed just kinda gets dumped in there. Fortunately, their preview tool does go grab content for you so you can actually see what it will look like:

And then you can style that by injecting a <style> block into the editor area yourself.

That gives us all the design control we need over the email, and it's nicely independent of how we might choose to style it on the site itself.

The post A Gutenburg-Powered Newsletter appeared first on CSS-Tricks.