<?xml version="1.0" encoding="UTF-8"?><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/"
	>

<channel>
	<title>Tutorial &#8211; Marcos Rego</title>
	<atom:link href="https://marcosrego.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://marcosrego.com</link>
	<description>Web Development</description>
	<lastBuildDate>Sat, 03 Feb 2024 16:45:20 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>
	<item>
		<title>Create custom utility classes and breakpoints for Mr.Utils</title>
		<link>https://marcosrego.com/blog/custom-utility-classes-breakpoints/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Sat, 27 Jan 2024 19:13:33 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Mr.Dev.'s Framework]]></category>
		<category><![CDATA[Mr.Utils]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=3083</guid>

					<description><![CDATA[Mr.Utils includes a good preset of utility classes, for spacing, colors, sizes, components and much more. And when using it on WordPress, you and other users can even select them via the block editor. But there might be occasions, that you need to have your own custom classes, and you might want them to be [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-3083"></span>
<!--noteaser-->



<p>Mr.Utils includes a good preset of utility classes, for spacing, colors, sizes, components and much more. And when using it on WordPress, you and other users can even select them via the block editor.</p>



<p>But there might be occasions, that you need to have your own custom classes, and you might want them to be available on the editor also.</p>



<p>And maybe you want to use those custom classes on specific breakpoints: The 4 preset breakpoints might not be enough for you, if that&#8217;s the case, you can also create custom breakpoints.</p>



<p>On this tutorial, you will learn how you can add your own custom utility classes and breakpoints to Mr.Utils. There are two ways to do it:</p>



<ul class="wp-block-list">
<li><strong>Using Mr.Dev.&#8217;s Framework</strong> &#8211; is the easiest way on WordPress.</li>



<li><strong>Manual implementation on Mr.Utils</strong></li>
</ul>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - Create custom utility classes and breakpoints for Mr.Utils" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong> gives you a set of classes with a clear syntax, such as <em><strong>mr-phone-hide</strong></em> clearly saying to hide an element on a phone, <strong><em>mr-marginright</em></strong> to add a margin on the right side of an element and <strong><a rel="noreferrer noopener" href="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" target="_blank">so much more</a></strong>&#8230;</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrutils"><strong>Get it now (free)</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading" id="using-mr-dev-s-framework-on-wordpress"><strong>Using Mr.Dev.&#8217;s Framework on WordPress</strong></h2>



<h3 class="  wp-block-heading" id="create-custom-utility-classes-using-mr-dev-s-framework"><strong>Create custom utility classes using Mr.Dev.&#8217;s Framework</strong></h3>



<ol class="  wp-block-list">
<li>Once on WordPress, go to &#8220;Settings&#8221; &gt; &#8220;Mr.Dev.&#8221; (or your website name, depending of the configuration).</li>



<li>Go to the &#8220;Utilities&#8221; tab (If the tab is not available, you&#8217;ll need to enable the option on the &#8220;Configuration&#8221; tab, at &#8220;Utilities configuration&#8221;).</li>



<li>On &#8220;Default options&#8221; click on &#8220;Choose available features&#8221; and select &#8220;Custom&#8221; on each breakpoint where you&#8217;ll want your custom classes to be available.</li>



<li>Below on &#8220;Custom Utilities&#8221;, click on + to add the first class.</li>



<li>Choose the class name (the class will be generated from this name).</li>



<li>Choose the CSS property (A list of some properties will appear while you write, those properties can be used for the block editor. You can still use any CSS property you want, even the ones not listed, the only downside is those might not appear on the block editor, you&#8217;ll need to copy &amp; paste the class).</li>



<li>Choose the CSS variable / value (If you have the &#8220;Styles&#8221; tab enabled, you can create the variables there, they will appear in here after. And you don&#8217;t have to use variables, you can also write the intended values directly here if you prefer.)</li>
</ol>



<p>Tip: If you want a class to have multiple properties, you can do it, by having the same class name repeated multiple times.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img decoding="async" width="1024" height="538" data-id="3104" src="https://marcosrego.com/wp-content/uploads/2024/01/mrdev-framework_mr-utils_custom-classes-1024x538.jpg" alt="custom utility classes on Mr.Utils with Mr.Dev.&#039;s Framework" class="wp-image-3104" title="mrdev framework mr utils custom classes - Create custom utility classes and breakpoints for Mr.Utils" srcset="https://marcosrego.com/wp-content/uploads/2024/01/mrdev-framework_mr-utils_custom-classes-1024x538.jpg 1024w, https://marcosrego.com/wp-content/uploads/2024/01/mrdev-framework_mr-utils_custom-classes-300x158.jpg 300w, https://marcosrego.com/wp-content/uploads/2024/01/mrdev-framework_mr-utils_custom-classes-768x403.jpg 768w, https://marcosrego.com/wp-content/uploads/2024/01/mrdev-framework_mr-utils_custom-classes.jpg 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</figure>



<h4 class="  wp-block-heading" id="using-the-custom-utility-classes"><strong>Using the custom utility classes</strong></h4>



<p>Once you create the custom utility classes, you will see inputs showing how the class looks for each breakpoint (that you selected on the 3rd step). You can click on the input to copy the class and then paste into your HTML, CSS, etc. </p>



<p>If the option &#8220;Show utilities on the block editor&#8221; is active, you can use the block editor to use the custom classes, for options related to spacing, coloring and sizes.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img decoding="async" width="772" height="250" data-id="2289" src="https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1.png" alt="Mr.Utils options on WordPress block editor" class="wp-image-2289" title="banner 772x250 1 - Create custom utility classes and breakpoints for Mr.Utils" srcset="https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1.png 772w, https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1-300x97.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1-768x249.png 768w" sizes="(max-width: 772px) 100vw, 772px" /><figcaption class="wp-element-caption">Mr.Utils options on WordPress block editor</figcaption></figure>
</figure>



<h3 class="  wp-block-heading" id="add-custom-breakpoints-using-mr-dev-s-framework"><strong>Add custom breakpoints using Mr.Dev.&#8217;s Framework</strong></h3>



<ol class="  wp-block-list">
<li>Once on WordPress, go to &#8220;Settings&#8221; &gt; &#8220;Mr.Dev.&#8221; (or your website name, depending of the configuration).</li>



<li>Go to the &#8220;Styles&#8221; tab (If the tab is not available, you&#8217;ll need to enable the option on the &#8220;Configuration&#8221; tab, at &#8220;Styles configuration&#8221;).</li>



<li>Scroll down to the &#8220;Breakpoints&#8221; section, where you will find 4 preset breakpoints already created, that you can change the values.</li>



<li>Click on &#8220;+&#8221; on &#8220;Number of Breakpoints&#8221; to add a custom breakpoint.</li>



<li>Choose the name for the breakpoint and define the min/max &#8211; width/height. </li>
</ol>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="951" height="963" data-id="2687" src="https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints.jpg" alt="ressanogarciaarq styles base breakpoints" class="wp-image-2687" title="ressanogarciaarq styles base breakpoints - Create custom utility classes and breakpoints for Mr.Utils" srcset="https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints.jpg 951w, https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints-296x300.jpg 296w, https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints-768x778.jpg 768w" sizes="auto, (max-width: 951px) 100vw, 951px" /><figcaption class="wp-element-caption">Example of using custom breakpoints on <a href="https://marcosrego.com/websites/ressanogarcia/" data-type="post" data-id="1795">Ressano Garcia Aquitectos website</a>.</figcaption></figure>
</figure>



<h4 class="  wp-block-heading" id="using-the-custom-breakpoints"><strong>Using the custom breakpoints</strong></h4>



<p>Once you create the custom breakpoints, you can select them on the &#8220;Utilities&#8221; tab or/and on the &#8220;Files / Media&#8221; tab. </p>



<p>On the &#8220;Files/Media&#8221; tab, you can choose on which breakpoints each spreadsheet should load (In production, do not forget to use a cache plugin with minifying options, to combine these spreadsheets, while keeping the breakpoints and their media queries).</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="693" data-id="956" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-1024x693.jpg" alt="Mr.Dev.&#039;s Framework - Files page" class="wp-image-956" title="mrdev framework files - Create custom utility classes and breakpoints for Mr.Utils" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-1024x693.jpg 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-300x203.jpg 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-768x520.jpg 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files.jpg 1342w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">On the Files / Media tab you can decide on which breakpoints a stylesheet should load.</figcaption></figure>
</figure>



<h2 class="wp-block-heading" id="manual-implementation-on-mr-utils"><strong>Manual implementation on Mr.Utils</strong></h2>



<h3 class="  wp-block-heading" id="create-custom-utility-classes"><strong>Create custom utility classes</strong></h3>



<ol class="  wp-block-list">
<li><a href="https://marcosrego.com/client-area/downloads/?product=mrutils" target="_blank" data-type="link" data-id="https://marcosrego.com/client-area/downloads/?product=mrutils" rel="noreferrer noopener">Download Mr.Utils.</a></li>



<li>Go to &#8220;dev/css&#8221;. Each folder located in here corresponds to one breakpoint (except for &#8220;utils&#8221; that is global).</li>



<li>Go to each folder/breakpoint where you want your custom classes to be available and create a utils_<em>breakpoint</em>_custom.css file on each one.</li>



<li>Open all the created files and add a class, following the utilities rules. Example: &#8220;<code>.mr-<em>breakpoint</em>-fontsize10 { }</code>&#8220;.</li>



<li>Add the intended CSS properties to each class. Example: &#8220;<code>font-size: var(--font-size-10,60px);</code>&#8220;.</li>



<li>Once you created all classes on all utils_custom.css, go to the main file on each folder/breakpoint, titled &#8220;utils_<em>breakpoint</em>.css&#8221;.</li>



<li>Add the following line: <code>@import url("utils_<em>breakpoint</em>_custom.css"); </code>Replacing &#8220;breakpoint&#8221; with the actual breakpoint name.</li>



<li><strong>For development</strong>, you can load each of the main &#8220;dev/css/utils_<em>breakpoint</em>/utils_<em>breakpoint</em>.css&#8221; files, with media queries. <br><strong>For production,</strong> you should use your favourite compiler, to compile the main files into the main &#8220;css&#8221; folder (located in the root folder). Use media queries to load all files inside that folder and then, use a page/html minifier to join all those media queried files into one.</li>
</ol>



<h3 class="  wp-block-heading" id="add-custom-breakpoints"><strong>Add custom breakpoints</strong></h3>



<p>With more files you can add more breakpoint names and media queries:</p>



<ol class="  wp-block-list">
<li>Start by copying one of the given breakpoint files. For this example, copy the file &#8216;utils_desktop.css&#8217;.</li>



<li>Change the file name to the name of your breakpoint. For this example rename it &#8216;utils_notmobile.css&#8217; .</li>



<li>Use your favorite code editor to find and replace all instances of &#8216;-desktop-&#8216; with &#8216;-notmobile-&#8216;.</li>



<li>Save the file next to other breakpoints and load it with your own media query. For this example, the easiest would be to add the following to the&nbsp;<code>&lt;head&gt;</code>&nbsp;section:<br><code>&lt;link rel='stylesheet' href='mr-utils/css/utils_notmobile.css' media='(min-width: 768px)' /&gt;</code></li>
</ol>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to easily transfer emails to a different service/host</title>
		<link>https://marcosrego.com/blog/transfer-emails-automatically/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Sat, 05 Aug 2023 17:35:58 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[For clients and authors]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2963</guid>

					<description><![CDATA[Are you changing your emails to a different service/provider (server, host or domain) but want to keep all data as is? You don&#8217;t have to do it manually! The problems of exporting and importing emails manually Forget about exporting and importing trough webmail, many times those have limits. You might end exporting without being able [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-2963"></span>
<!--noteaser-->



<p>Are you changing your emails to a different service/provider (server, host or domain) but want to keep all data as is?<strong> You don&#8217;t have to do it manually!</strong></p>



<h2 class="mr-paddingtop  wp-block-heading"><strong>The problems of exporting and importing emails manually</strong></h2>



<p>Forget about exporting and importing trough webmail, many times those have limits.</p>



<p>You might end exporting without being able to import after (and a backup is no good if you can&#8217;t later import it, right?). Dividing an export into many different files, to avoid limits, it&#8217;s also a lot of work and can lead to mistakes.</p>



<p>You might even remember to export the &#8220;Inbox folder&#8221;, but what about others, such as &#8220;Sent&#8221; or custom ones.</p>



<p>That&#8217;s why on this post, I want to share with you a very handy on-line tool, properly called <strong><a href="https://imapsync.lamiral.info/X/" data-type="URL" data-id="https://imapsync.lamiral.info/X/" target="_blank" rel="noreferrer noopener">Mailbox Imapsync Online</a></strong>.</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   wp-block-heading has-main-text-color-color has-text-color"><strong>Do you need a website?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/07/store-marcosrego-opengraph-1024x538.png" alt="Marcos Rego Store Opengraph Image" class="wp-image-1021" title="store marcosrego opengraph - How to easily transfer emails to a different service/host" srcset="https://marcosrego.com/wp-content/uploads/2021/07/store-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/07/store-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/07/store-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/07/store-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color">If you need a <strong>website</strong>, you can check the <strong><a href="https://marcosrego.com/client-area/shop/" data-type="post" data-id="673">Shop</a></strong> on the <strong><a href="https://marcosrego.com/./client-area/" data-type="category" data-id="52">Client Area</a></strong> and get an estimation of the development cost. <strong>Pay only 20%</strong>, until the website is ready.</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background wp-element-button" href="https://marcosrego.com/client-area/shop/"><strong>go to THE SHOP</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="mr-paddingtop  wp-block-heading"><strong>How to use Mailbox Imapsync Online to transfer emails automatically</strong></h2>



<p>Using <a href="https://imapsync.lamiral.info/X/" target="_blank" data-type="URL" data-id="https://imapsync.lamiral.info/X/" rel="noreferrer noopener">Mailbox Imapsync Online</a> couldn&#8217;t be simpler:</p>



<p>First, be sure that you have the credentials of the two email addresses.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-full"><img loading="lazy" decoding="async" width="1200" height="630" data-id="2977" src="https://marcosrego.com/wp-content/uploads/2023/08/transfer-emails-mailbox-imapsync-online-opengraph.jpg" alt="Transfer emails with Mailbox Imapsync Online" class="wp-image-2977" title="transfer emails mailbox imapsync online opengraph - How to easily transfer emails to a different service/host" srcset="https://marcosrego.com/wp-content/uploads/2023/08/transfer-emails-mailbox-imapsync-online-opengraph.jpg 1200w, https://marcosrego.com/wp-content/uploads/2023/08/transfer-emails-mailbox-imapsync-online-opengraph-300x158.jpg 300w, https://marcosrego.com/wp-content/uploads/2023/08/transfer-emails-mailbox-imapsync-online-opengraph-1024x538.jpg 1024w, https://marcosrego.com/wp-content/uploads/2023/08/transfer-emails-mailbox-imapsync-online-opengraph-768x403.jpg 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>
</figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="  wp-block-heading"><strong>Source email</strong></h3>



<p class="mr-nomarginbottom ">On the left side, you will find &#8220;IMAP source Mailbox&#8221;. You will put there the credentials of the source email address, the one that you want to transfer emails from. You can get the correct &#8220;IMAP server hostname&#8221; on your hosting service or by checking to where the MX records were pointing at (Can also be an IP, in fact might be better if you already made changes to you Domain Name Server).</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="  wp-block-heading"><strong>Destination email</strong></h3>



<p class="mr-nomarginbottom ">On the right side, you will put the credentials of the new email address. Be sure to create the email first on the new provider. You must get the correct &#8220;IMAP server hostname&#8221; on your new hosting service (or new server) or by checking to where the MX records are/should be pointing at (Can also be an IP).</p>
</div>
</div>



<h3 class="  wp-block-heading"><strong>Extra parameters</strong></h3>



<p>If you want, you can also automatically delete the source emails that get transferred &#8211; Click on &#8220;Show/hide extra parameters&#8221; and you&#8217;ll see the new option &#8220;Move sync&#8221; appearing on the left side. This can be useful to avoid the 3GB limit that the tool currently has, on the free version.</p>



<h3 class="  wp-block-heading"><strong>Click sync to automatically transfer emails</strong></h3>



<p>Then you simply click the green button &#8220;Sync or resync&#8221;! Keep the window opened and check the console log to be sure that everything is going smoothly. If something breaks, do not worry, simply click again the green button and the process will continue as &#8220;Resync&#8221; suggests.</p>



<h2 class="mr-paddingtop  wp-block-heading"><strong>Besides automatically transfer emails, there&#8217;s more to Mailbox Imapsync Online</strong></h2>



<h3 class="  wp-block-heading"><strong>Sync between different email addresses</strong></h3>



<p>If you look closer to all options, you are not limited to transfer emails between the same email addresses. <br>So let&#8217;s say there&#8217;s a new employee in <em>yourcompany</em> called <em>Lucy</em> working in content marketing, her email is <em>lucy.copy@yourcompany.org</em>, the old content marketer was <em>Lauren</em> and her email was <em>lauren.writter@yourcompany.org</em>. <br>With <a href="https://imapsync.lamiral.info/X/" target="_blank" data-type="URL" data-id="https://imapsync.lamiral.info/X/" rel="noreferrer noopener">Mailbox Imapsync Online</a>, you can transfer all of those work related emails, about content marketing, to the new employee.</p>



<h3 class="  wp-block-heading"><strong>Just create folders</strong></h3>



<p>If you don&#8217;t want to transfer all the emails, but want to keep the same structure of another email address, you actually have a checkbox to &#8220;Just create folders&#8221; during the sync.</p>



<p class="mr-paddingtop "><strong>Did you know about this tool before? Was this helpful?</strong> </p>



<p>Let me know in the comments section below. </p>



<p>I remember searching for something free like this in the past and it wasn&#8217;t easy. Until an old hosting provider mentioned it to me, during support. They were more life savers then I care to admit, I hope for you too. </p>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to style a datalist and its options?</title>
		<link>https://marcosrego.com/blog/style-datalist-options/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Tue, 27 Dec 2022 20:10:17 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mr.Utils]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2875</guid>

					<description><![CDATA[If you ever tried to change the look and feel of a HTML5 datalist but couldn’t, then this post might be your (delayed) Christmas present 🎄🎁 (I hope you had a great one and close to the ones you love the most)! What’s the problem of styling a HTML5 datalist? At the moment of writing, [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-2875"></span>
<!--noteaser-->



<p>If you ever tried to change the look and feel of a HTML5 datalist but couldn’t, then this post might be your (delayed) Christmas present 🎄🎁 (I hope you had a great one and close to the ones you love the most)!</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - How to style a datalist and its options?" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong> gives you a set of classes with a clear syntax, such as <em><strong>mr-phone-hide</strong></em> clearly saying to hide an element on a phone, <strong><em>mr-marginright</em></strong> to add a margin on the right side of an element and <strong><a rel="noreferrer noopener" href="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" target="_blank">so much more</a></strong>&#8230;</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrutils"><strong>Get it now (free)</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading"><strong>What’s the problem of styling a HTML5 datalist?</strong></h2>



<p>At the moment of writing, it’s not possible to style a datalist directly.</p>



<p>Hopefully in the future, we will be able to simply use normal CSS like this:</p>



<pre class="wp-block-code"><code>.mr-datalist &gt; * {
    background-color: var(--dark);
    color: var(--light);
}</code></pre>



<p>For now, if you still want to use datalist, there are two ways to do it:</p>



<ul class="wp-block-list">
<li><a href="#the_easiest_way_to_style_a_datalist" data-type="internal" data-id="#the_easiest_way_to_style_a_datalist">An easy way, using a class from a front-end toolkit.</a></li>



<li><a href="#style_a_datalist_with_code">A more manual way, using Vanilla JavaScript.</a></li>
</ul>



<p>The CSS code above will work after implementing any of those 2 options.</p>



<p>Some things that might be important to you:&nbsp;</p>



<ul class="wp-block-list">
<li>These methods might not work on iOS versions prior to the 13th. On those devices, the datalist will not change, working as it does by default.</li>



<li>Both methods should be future-proof. When HTML5 data lists become easier to style, you can remove the front-end toolkit or the JavaScript code. Just keep the classes and the CSS as is.</li>
</ul>



<p>With that aside, let’s move on with this tutorial…</p>



<h2 class="wp-block-heading"><strong>The easiest way to style a datalist</strong></h2>



<p>You can use a front-end toolkit such as <strong><a href="https://marcosrego.com/development/mr-utils/" target="_blank" data-type="post" data-id="473" rel="noreferrer noopener">Mr.Utils</a></strong>.</p>



<p>All you have to do is, make sure you are adding the global JavaScript file <em>js/utils.js</em> in your page (or if you don’t want to load the entire toolkit, you can individually add <em>dev/js/utils/utils_components.js</em>).</p>



<p>After that, you need to add the correct class <strong>.mr-datalist</strong> to your datalist <em>(not to the input)</em> and it will magically transform it into a “search” component.</p>



<p>You can then style it with a <a href="#whats_the_problem_of_styling_a_html5_datalist">CSS code similar to the one shown before</a>.</p>



<h2 class="wp-block-heading"><strong>Style a datalist with code</strong></h2>



<p>I mentioned that the easiest way of implementation works like magic, but of course there’s no magic behind it at all, just the correct JavaScript code.</p>



<p>In this post, I’ll share a simplified version of that code with you.</p>



<p>You can either follow the steps or <strong><a href="#gist_full_code_on_how_to_style_a_datalist">jump directly to the Gist full code</a></strong>.</p>



<p>Feel free to change it to your specific needs.</p>



<h3 class="  wp-block-heading"><strong>1- Transform the datalist into an element that can be styled.</strong></h3>



<pre class="wp-block-code"><code>document.addEventListener("DOMContentLoaded", function () {
  const mrDataLists = document.querySelectorAll(".mr-datalist");
  for (let id = 0; id &lt; mrDataLists.length; id++) {
    let mrDataList = mrDataLists&#91;id];
    let mrDataListUL = "";
    let mrDataListClone = "";
 
    mrDataListClone =
      mrDataList
        .cloneNode(true)
        .innerHTML.replaceAll("&lt;option", "&lt;li")
        .replaceAll("&lt;/option&gt;", "&lt;/li&gt;");
    mrDataListUL = document.createElement("ul");
    mrDataListUL.id = mrDataList.id;
    mrDataListUL.className = mrDataList.className;
    mrDataListUL.innerHTML = mrDataListClone;
 
    mrDataList.replaceWith(mrDataListUL);
  }
}
</code></pre>



<p>In this first step, we grab all data lists that have the class <em>.mr-datalist, </em>but you can change it to your own.</p>



<p>You can even grab all data lists without exception, by replacing the class <em>.mr-datalist</em> with the property <em>datalist, </em>on the <em>querySelectorAll </em>(Don’t forget to change the CSS code accordingly at the end).</p>



<p>In this example, we transform the datalist into an unordered list. You can change that if you wish, but it should be an element with direct children. Each direct child will be a datalist option.</p>



<p>The <em>replaceWith </em>at the end finishes the transformation, but we are not done yet.</p>



<p>We need to create a similar “search” functionality to the one the HTML5 datalist has.</p>



<h3 class="  wp-block-heading"><strong>2- Make the input find content on the element.</strong></h3>



<pre class="wp-block-code"><code>document.addEventListener("keyup", function (e) {
  let mrDataListID = "mr-datalist";
  if (e.target.matches('input&#91;list="'+mrDataListID+'"]')) {
    mrSearch(document.getElementById(mrDataListID), e.target);
  }
  e.stopPropagation();
});
</code></pre>



<p>In here, I’m assuming we know the ID of the datalist, and that we have it on the input “list” attribute. I’m assuming that because those are needed for the original datalist to work.<br>In this example, the ID is <em>mr-datalist,</em> set on the mrDataListID variable.</p>



<p>If for some reason you don’t know the ID, there are alternative ways to do it. On Mr.Utils for example, the “Search” component removes the original input, creates a new one and uses <em>nextElementSibling</em>. It does that for a reason, you can check that on the <a href="https://github.com/marcosrego-web/mr-utils/blob/master/dev/js/utils/utils_components.js" target="_blank" rel="noreferrer noopener nofollow">GitHub repository</a>.</p>



<p>As you might notice, we are calling the function <em>mrSearch</em>, which will do the heavy work.&nbsp;</p>



<p>Here is the function simplified, feel free to rename it to anything you want:</p>



<pre class="wp-block-code"><code>function mrSearch(t, e) {
  //t = Datalist
  //e = Input with list attribute
  let mrSearchChildren = t.children;
  if (mrSearchChildren) {
    if (e.value !== "") {
      t.style.removeProperty("display");
      for (let id = 0; id &lt; mrSearchChildren.length; id++) {
        let mrSearchChild = mrSearchChildren&#91;id];
        if (mrSearchChild.hasAttribute("value")) {
          //If the child does not contain any text, show the value as text.
          if (!mrSearchChild.innerText) {
            mrSearchChild.innerText = mrSearchChild.getAttribute("value");
          }
 
          //Change the input value when clicking on the child.
          mrSearchChild.addEventListener("click", function () {
            e.value = mrSearchChild.getAttribute("value");
          });
        }
        mrSearchChild.style.display = "none";
 
        //Checking the child outerHTML because I want to search text also inside the value attribute. Convert in lowercase to not be case sensitive.
        if (
          mrSearchChild.outerHTML
            .toLowerCase()
            .replace(/&#91;^a-zA-Z0-9 ]/g, "")
            .includes(e.value.toLowerCase().replace(/&#91;^a-zA-Z0-9 ]/g, ""))
        ) {
          mrSearchChild.style.removeProperty("display");
        }
      }
    } else {
      t.style.display = "none";
    }
  }
}

</code></pre>



<p>Here we changed the Input value when clicking on the element child <em>(the datalist option that we transformed)</em> and we’ll make the search case-insensitive.</p>



<p>Check the comments inside the code to better understand which parts replicate which datalist “search” feature.</p>



<p>Extra: If you have full control over the original datalist, you probably added a value and text to each option. If you don’t have, then this code as you covered, it copies the value into the text when no text is found.</p>



<p><strong>And that’s it! </strong>Now you replicated most datalists’ functionalities and can start styling the element, with a <a href="#whats_the_problem_of_styling_a_html5_datalist">CSS code similar to the one shown before</a>.</p>



<h3 class="  wp-block-heading"><strong>3- Take it to the next level (Optional and Advanced)</strong></h3>



<p>If you feel inspired, now that you have full control over the code, you can add extra features! Features that not even the original datalist has.</p>



<p>For example:</p>



<ul class="wp-block-list">
<li>Show a message when no result is found.</li>



<li>Bold the text while it is found on the results.</li>



<li>If no exact match is found, search by each keyword instead <em>(You can also show a message in that situation)</em>.</li>



<li>Show results only after a minimum number of characters <em>(This is a good idea to avoid connection words and code properties)</em>.</li>
</ul>



<p>I did many of those features for <strong>Mr.Utils</strong>, <strong><a href="https://github.com/marcosrego-web/mr-utils/blob/master/dev/js/utils/utils_components.js#L356" target="_blank" rel="noreferrer noopener nofollow">you can check the part of the code here</a></strong>.</p>



<p>Might also be a good idea, to track pressing keyboard arrow keys, to select the results and improve accessibility.</p>



<h3 class="  wp-block-heading"><strong>Gist full code on how to style a datalist</strong></h3>



<script src="https://gist.github.com/marcosrego-web/943e82bbd6243e8f38af4ff5ce081dc6.js"></script>



<h2 class="wp-block-heading"><strong>Working example of styling datalists</strong></h2>



<p>I did something very similar to the methods explained above for <strong><a href="https://www.rydoo.com/compliance/" target="_blank" data-type="URL" data-id="https://www.rydoo.com/compliance/" rel="noreferrer noopener nofollow">Rydoo’s Compliance Centre</a></strong> and <strong><a href="https://www.rydoo.com/marketplace/" data-type="URL" data-id="https://www.rydoo.com/marketplace/" target="_blank" rel="noreferrer noopener nofollow">Marketplace</a></strong>.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-6 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://www.rydoo.com/compliance/" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1024" height="522" data-id="2727" src="https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre-1024x522.png" alt="Rydoo-Compliance_Centre" class="wp-image-2727" title="Rydoo Compliance Centre - How to style a datalist and its options?" srcset="https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre-1024x522.png 1024w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre-300x153.png 300w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre-768x391.png 768w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre-1536x783.png 1536w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Compliance_Centre.png 1902w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Rydoo&#8217;s Compliance Centre</figcaption></figure>



<figure class="     wp-block-image size-large"><a href="https://www.rydoo.com/marketplace/" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1024" height="522" data-id="2724" src="https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace-1024x522.png" alt="Rydoo-Marketplace" class="wp-image-2724" title="Rydoo Marketplace - How to style a datalist and its options?" srcset="https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace-1024x522.png 1024w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace-300x153.png 300w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace-768x391.png 768w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace-1536x783.png 1536w, https://marcosrego.com/wp-content/uploads/2021/08/Rydoo-Marketplace.png 1902w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Rydoo&#8217;s Marketplace</figcaption></figure>
</figure>



<p>I hope you enjoyed this post! I&#8217;m not sure that I will be writing something more on the blog before entering the new year, so enjoy the celebrations and <strong>let&#8217;s enter 2023 with the right footer!!</strong> 🥂🎆🥳</p>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>5 cool extras from Mr.Dev&#8217;s Framework that you should know</title>
		<link>https://marcosrego.com/blog/mrdev-framework-extras/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Fri, 05 Aug 2022 18:39:56 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Mr.Dev.]]></category>
		<category><![CDATA[Mr.Dev.'s Framework]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2668</guid>

					<description><![CDATA[Besides the usual tasks, the framework brings some handy extra features such as white labelling WordPress, block editor on WooCommerce, dequeue CSS and JS files, changing the backend style, setting CSS root variables and more&#8230; In this post, I&#8217;ll be focusing on those useful extras. Whitelabel WordPress and Mr.Dev. for a more friendly and professional [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Besides <a href="https://marcosrego.com/development/mrdev-framework/#features" data-type="post" target="_blank" rel="noreferrer noopener">the usual tasks</a>, the framework brings some handy extra features such as white labelling WordPress, block editor on WooCommerce, dequeue CSS and JS files, changing the backend style, setting CSS root variables and more&#8230;</p>



<span id="more-2668"></span>



<p>In this post, I&#8217;ll be focusing on those useful extras.</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><a href="https://marcosrego.com/development/mrdev-framework/"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png" alt="Mr.Dev.&#039;s Framework Opengraph Image" class="wp-image-1026" title="mrdevframework marcosrego opengraph - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="  has-main-text-color-color has-text-color">When <strong>Mr.Dev.</strong> sells his <strong>framework</strong>, <strong>one unique payment</strong> gives you <strong>updates forever</strong> and for <strong>unlimited websites</strong>!</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/development/mrdev-framework/"><strong>Know more</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading"><strong>Whitelabel WordPress and Mr.Dev. for a more friendly and professional look</strong></h2>



<h3 class="  wp-block-heading"><strong>Whitelabel WordPress and Mr.Dev. titles and logos</strong></h3>



<p>Mr.Dev&#8217;s Framework can replace the main instances of WordPress title and logo with the site&#8217;s name and favicon, this will better personalize the backend and login page to you or your client. Giving that extra friendly and professional touch shows that you care and leaves a good impression on your client.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-7 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login.jpg"><img loading="lazy" decoding="async" width="1024" height="518" data-id="2685" src="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login-1024x518.jpg" alt="itemzero whitelabel backend login" class="wp-image-2685" title="itemzero whitelabel backend login - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login-1024x518.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login-300x152.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login-768x389.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login-1536x777.jpg 1536w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-whitelabel-backend-login.jpg 1749w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Replace the WordPress logo on the login page with your own.</figcaption></figure>
</figure>



<p>Mr.Dev.&#8217;s Framework can also replace its own title and logo, that way your client can easily find where the framework settings and make changes. It&#8217;s much easier for you to explain and for your client to remember that he/she needs to &#8220;go to <em>Settings &gt; Website name &gt; Styles, </em>to change the colours<em>&#8220;</em> compared to saying &#8220;Settings &gt; Mr.Dev.&#8217;s Framework &gt; Styles&#8221;.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-8 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend.jpg"><img loading="lazy" decoding="async" width="1901" height="963" data-id="2684" src="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend.jpg" alt="itemzero mrdev whitelabel backend" class="wp-image-2684" title="itemzero mrdev whitelabel backend - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend.jpg 1901w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend-300x152.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend-1024x519.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend-768x389.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-mrdev-whitelabel-backend-1536x778.jpg 1536w" sizes="auto, (max-width: 1901px) 100vw, 1901px" /></a><figcaption class="wp-element-caption">Replace WordPress&#8217; and Mr.Dev.&#8217;s name and logo with your website name and favicon.</figcaption></figure>
</figure>



<h3 class="  wp-block-heading"><strong>Whitelabel WordPress active theme</strong></h3>



<p>If you are using a theme that changes looks over time, or it uses a name that does not match the website, it can also be friendly and looks professional, to change the look of the active theme on WordPress theme list, to show the current look and name of the website.</p>



<p>By enabling the &#8220;Active theme&#8221; white label, the active theme will always show a screenshot and the name of the website, as shown on the image below.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-9 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel.jpg"><img loading="lazy" decoding="async" width="1920" height="954" data-id="2698" src="https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel.jpg" alt="Giftncraft active theme whitelabel" class="wp-image-2698" title="giftncraft active theme whitelabel - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel.jpg 1920w, https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel-300x149.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel-1024x509.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel-768x382.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/08/giftncraft-active-theme-whitelabel-1536x763.jpg 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></a><figcaption class="wp-element-caption">On the left side the list of themes without whitelabel, on the right side the list with the active theme whitelabel with site name and screenshot. (From <a href="https://marcosrego.com/websites/giftncraft/" target="_blank" data-type="post" data-id="120" rel="noreferrer noopener">Gift &amp; Craft website</a>)</figcaption></figure>
</figure>



<h3 class="  wp-block-heading"><strong>Change WordPress backend styling</strong></h3>



<p>With some themes, you can find the option to style the backend in the Configuration tab of the Framework. By enabling it, the styles configured on the styles tab will be automatically applied on the backend.</p>



<p>Currently, the Mr.Dev_s theme shows that option if you have Beta Test enabled.</p>



<p>If your theme does not give you that option, all you need to do is to create a file named <em>style-admin.css</em> on the root folder. Edit the file to add styles accordingly <em>(you can use the variables you set on the Framework)</em> and enable the option to see the results on the backend.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-10 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev.jpg"><img loading="lazy" decoding="async" width="1920" height="964" data-id="2686" src="https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev.jpg" alt="marcosrego backend style mrdev" class="wp-image-2686" title="marcosrego backend style mrdev - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev.jpg 1920w, https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev-300x151.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev-1024x514.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev-768x386.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/08/marcosrego-backend-style-mrdev-1536x771.jpg 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></a><figcaption class="wp-element-caption">Style the backend with the variables set on Mr.Dev.&#8217;s Framework</figcaption></figure>
</figure>



<h2 class="wp-block-heading"><strong>Dequeue CSS and JS files from WordPress or plugins</strong></h2>



<p>Another cool and handy feature on Mr.Dev&#8217;s Framework is the File Manager, not only it allows adding new styles and scripts, it also allows to dequeue files that were already loaded, not only by the framework but also from other plugins or even WordPress itself.</p>



<p>To do this, go to the &#8220;Files&#8221; tab and increase the number of files (Styles or Scripts).</p>



<p>Then, for the new &#8220;File ID&#8221; field, you&#8217;ll grab the ID of the file that you want to dequeue, without -css or -js. </p>



<p>For example, if you wanted to dequeue the styles of the block editor, you would inspect the source of a page and find something like this:</p>



<pre class="wp-block-code"><code>&lt;link rel='stylesheet' id='wp-block-library-css'  href='/wp-includes/css/dist/block-library/style.min.css?ver=6.0.1' media='all' /&gt;</code></pre>



<p>The part &#8220;wp-block-library&#8221; is what you need to copy and paste on the &#8220;File ID&#8221; field.</p>



<p>Then, on the load part, you&#8217;ll choose &#8220;Do not load&#8221;.</p>



<p>Save and that&#8217;s it!</p>



<p>You don&#8217;t need to add the File URL in this situation.</p>



<p>Combine this with assignments if you want to remove a style or script from specific posts / categories / post-types&#8230;</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-11 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="693" data-id="956" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-1024x693.jpg" alt="Mr.Dev.&#039;s Framework - Files page" class="wp-image-956" title="mrdev framework files - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-1024x693.jpg 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-300x203.jpg 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files-768x520.jpg 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_files.jpg 1342w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Add files or external urls, choose when to load each one and edit them directly in WordPress with the default plugins editor.</figcaption></figure>
</figure>



<h2 class="wp-block-heading"><strong>How to set the base for rem sizes</strong></h2>



<p>If you are using rem sizes on your CSS variables, you might want to set the base size for rem and change it depending on the breakpoints.</p>



<p>It&#8217;s really easy to do it with Mr.Dev.&#8217;s Framework, just set one variable name to &#8220;base&#8221; and save. Once you save, you&#8217;ll notice that also the breakpoints now have the option to change the base value accordingly.</p>



<p>On the back side of things, Mr.Dev.&#8217;s Framework adds the font-size to the html element once it recognizes the &#8220;base&#8221; variable, on the same stylesheet.</p>



<h2 class="wp-block-heading"><strong>Add root variables instead of body for styling</strong></h2>



<p>Most times, adding CSS variables to the <em>body</em> is the way to go if you want to make them available to use anywhere on your pages (for example: WordPress block editor and FSE [Full site editor] do exactly that), that&#8217;s why Mr.Dev.&#8217;s Framework does it.</p>



<p>But there are specific situations, that you might want to have the variables available to elements before the body. For example: setting a value for <em>scroll-padding-top</em> (to have a scroll offset) with a variable can only be done on the html or on the root element.</p>



<p>Those are very specific situations, so the way to do it might not be very obvious, but it&#8217;s very easy. All you have to do on the framework is to include one of the following words on your variable name/slug:<br>&#8220;<strong>base</strong>&#8220;, &#8220;<strong>root</strong>&#8221; or &#8220;<strong>offset</strong>&#8220;.</p>



<p>By doing that, the framework will add those variables to the root element when creating the <em>vars.css</em> file.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-12 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints.jpg"><img loading="lazy" decoding="async" width="951" height="963" data-id="2687" src="https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints.jpg" alt="ressanogarciaarq styles base breakpoints" class="wp-image-2687" title="ressanogarciaarq styles base breakpoints - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints.jpg 951w, https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints-296x300.jpg 296w, https://marcosrego.com/wp-content/uploads/2022/08/ressanogarciaarq-styles-base-breakpoints-768x778.jpg 768w" sizes="auto, (max-width: 951px) 100vw, 951px" /></a><figcaption class="wp-element-caption">Example of using offset and base on Mr.Dev.&#8217;s Framework Styles (example from <a href="https://marcosrego.com/websites/ressanogarcia/" target="_blank" data-type="post" data-id="1795" rel="noreferrer noopener">Ressano Garcia Arquitectos</a>).</figcaption></figure>
</figure>



<h2 class="wp-block-heading"><strong>Enable the block editor on WooCommerce product pages and remove WooCommerce default styles</strong></h2>



<p>If you have WooCommerce enabled, you will find options for it on the Configuration tab of Mr.Dev.&#8217;s Framework.</p>



<p>One option allows removing all WooCommerce default styles, this is very helpful if you want to style WooCommerce from scratch.</p>



<p>Another option is to enable the block editor on WooCommerce product pages. This option is currently only visible when the Beta test option is enabled, but it&#8217;s already on a stable status. It&#8217;s totally safe to enable beta test to use this feature. The only reason this is not yet on the master build is because I&#8217;m still considering whether to create or not a &#8220;post type manager &amp; builder&#8221;, if so this option will move to that feature.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-13 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor.jpg"><img loading="lazy" decoding="async" width="1920" height="918" data-id="2689" src="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor.jpg" alt="itemzero example using the block editor on woocommerce" class="wp-image-2689" title="itemzero example using woocommerce block editor - 5 cool extras from Mr.Dev&#039;s Framework that you should know" srcset="https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor.jpg 1920w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor-300x143.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor-1024x490.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor-768x367.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/08/itemzero-example-using-woocommerce-block-editor-1536x734.jpg 1536w" sizes="auto, (max-width: 1920px) 100vw, 1920px" /></a><figcaption class="wp-element-caption">Using the block editor on WooCommerce Product page (example from <a href="https://marcosrego.com/websites/itemzero/" target="_blank" data-type="post" data-id="1" rel="noreferrer noopener">itemzero&#8217;s shop</a>)</figcaption></figure>
</figure>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to avoid (CLS) Layout Shift when using JS Components</title>
		<link>https://marcosrego.com/blog/avoid-layout-shift-mrutils/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Mon, 06 Jun 2022 22:26:37 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Mr.Utils]]></category>
		<category><![CDATA[Toolkit]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2627</guid>

					<description><![CDATA[When using components that are based on JavaScript, you might notice a layout shift on your content (CLS), especially if you delay the start of JavaScript in some way. In that situation, you&#8217;ll see the initial look of the elements until JavaScript kicks in. But of course, delaying JavaScript until user interaction or after some [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-2627"></span>
<!--noteaser-->



<p>When using components that are based on JavaScript, you might notice a layout shift on your content (CLS), especially if you delay the start of JavaScript in some way. In that situation, you&#8217;ll see the initial look of the elements until JavaScript kicks in.</p>



<p>But of course, delaying JavaScript until user interaction or after some seconds it&#8217;s a good practice and a good trick to increase the score of a website on<a href="https://pagespeed.web.dev/" data-type="URL" data-id="https://pagespeed.web.dev/" target="_blank" rel="noreferrer noopener"> pagespeed insights</a>. So the better option is to find ways to avoid layout shifts, fortunately it is not that complicated.</p>



<p>For this tutorial, I&#8217;ll be focusing on <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a> JS components, but the same logic applies to other tools.</p>



<div style="height:40px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Understand how general JS Components work</strong></h2>



<p>The way Mr.Utils JavaScript components work is by adding the necessary CSS inline properties to the element after page load, but only if the element doesn&#8217;t have a utility class that already uses some of those properties.</p>



<p>And as you might know, HTML classes don&#8217;t rely on JavaScript to apply the style of CSS properties. We&#8217;ll use that fact to our benefit, to avoid the layout shift when delaying JavaScript in this situation.</p>



<h2 class="wp-block-heading"><strong>Fixing the Content Layout Shift</strong></h2>



<h3 class="  wp-block-heading"><strong>Fix CLS for components that add properties</strong></h3>



<p>Components such as <strong>Mr.Utils Swipe component</strong> add the following inline properties to the element:</p>



<pre class="wp-block-code"><code>display: -webkit-inline-box;
flex-wrap: unset !important;
overflow-x: scroll !important;
-webkit-overflow-scrolling: touch !important;
overflow-y: hidden;</code></pre>



<p>But there&#8217;s one utility class that does the exact same thing, so all you need to do is to add the following utility class after adding the swipe class:</p>



<pre class="wp-block-code"><code>mr-horizontalscroll</code></pre>



<p>If you are using Mr.Utils as a plugin: Instead of adding the class, you can select the option at Misc &gt; Scroll &gt; Horizontal Scroll.</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - How to avoid (CLS) Layout Shift when using JS Components" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong> can be installed as a <strong>WordPress plugin</strong>.<br>Give to the <strong>block editor</strong> super-powers such as <strong>pagination or components</strong> and apply changes <strong>depending of the device</strong>!</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrutils"><strong>Get it now (free)</strong></a></div>
</div>
</div></section>
</div></aside>



<p>In the end, you&#8217;ll have the following classes on your element:</p>



<pre class="wp-block-code"><code>mr-swipe mr-horizontalscroll</code></pre>



<p>By doing this, the properties will be added before JavaScript runs, and you&#8217;ll be avoiding the layout shift, without losing the benefits of the swipe component (such as the ability to drag with a mouse).</p>



<h3 class="  wp-block-heading"><strong>Fix CLS for components that create new elements</strong></h3>



<p>Components such as <strong>Tabs </strong>and navigation options on <strong>Pagination (Radio, Arrows, Dropdown)</strong> add new elements to the page if those elements do not exist yet. So, the way to avoid layout shifting when JavaScript starts on this situation, is to create the elements manually, let&#8217;s take a look at that:</p>



<p>If you want to use the exact same elements that Mr.Utils&#8217; JavaScript would create, you can use the below HTML Codes after the element <em>(or before when using <a href="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes#components" target="_blank" rel="noopener">the proper class</a>)</em>.</p>



<p><strong>Pagination Arrows</strong></p>



<pre class="wp-block-code"><code>&lt;div class="mr-pagination"&gt;
&lt;button class="mr-arrows mr-prev"&gt;⇦&lt;/button&gt;
&lt;button class="mr-arrows mr-next"&gt;⇨&lt;/button&gt;
&lt;/div&gt;</code></pre>



<p><strong>Pagination Radio Buttons</strong></p>



<p><em>Duplicate the last &#8220;mr-radio&#8221; to match the number of pages</em>.</p>



<pre class="wp-block-code"><code>&lt;div class="mr-pagination"&gt;
&lt;span class="mr-radios"&gt;
&lt;input name="mr-radio" title="1/2" class="mr-radio" type="radio" value="1" checked="checked"&gt;
&lt;input name="mr-radio" title="2/2" class="mr-radio" type="radio" value="2"&gt;
&lt;/span&gt;
&lt;/div&gt;</code></pre>



<p><strong>Pagination Dropdown</strong></p>



<p><em>Duplicate the last &#8220;option&#8221; to match the number of pages</em>.</p>



<pre class="wp-block-code"><code>&lt;div class="mr-pagination"&gt;
&lt;select class="mr-pageselect" title="/2"&gt;
&lt;option value="1"&gt;1&lt;/option&gt;
&lt;option value="2"&gt;2&lt;/option&gt;
&lt;/select&gt;
&lt;/div&gt;</code></pre>



<p><strong>Tabs</strong></p>



<p><em>Duplicate the last &#8220;mr-tab&#8221; to match the number of pages</em>.</p>



<pre class="wp-block-code"><code>&lt;div class="mr-tabsnav mr-horizontalscroll"&gt;
&lt;button class="mr-tab mr-active"&gt;Tab 01&lt;/button&gt;
&lt;button class="mr-tab"&gt;Tab 02&lt;/button&gt;
&lt;/div&gt;</code></pre>



<p>If you want a bit more control or if you use site-builders, you can also create those new elements differently, as long as the main/parent element uses the class <em>mr-pagination</em> or <em>mr-tabsnav</em>.</p>



<p>If you are using Mr.Utils as a plugin on WordPress, you can use the block editor to create buttons for the Tabs component. Then, by selecting the buttons&#8217; container, on Utilities choose Components &gt; Tabs Navigation.</p>



<h2 class="wp-block-heading"><strong>Live example of fixing Tabs CLS</strong></h2>



<p>A good live example of this is on <a href="https://shop.itemzero.com/" data-type="URL" data-id="https://shop.itemzero.com/" target="_blank" rel="noreferrer noopener">Itemzero&#8217;s Shop</a>, the tabs were created using the block editor and Mr.Utils.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-14 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="572" data-id="1611" src="https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs-1024x572.jpg" alt="Itemzero&#039;s shop uses tabs" class="wp-image-1611" title="itemzero mrdev widget tabs - How to avoid (CLS) Layout Shift when using JS Components" srcset="https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs-1024x572.jpg 1024w, https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs-300x168.jpg 300w, https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs-768x429.jpg 768w, https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs-1536x858.jpg 1536w, https://marcosrego.com/wp-content/uploads/2021/04/itemzero-mrdev_widget-tabs.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Itemzero&#8217;s shop uses tabs from Mr.Utils components.</figcaption></figure>
</figure>



<div style="height:40px" aria-hidden="true" class="  wp-block-spacer"></div>



<p>And that&#8217;s it! Those are some ways to avoid layout shift when using JS Components.</p>



<div style="height:40px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>More than 6 essential mouseover effects for the block editor</title>
		<link>https://marcosrego.com/blog/block-editor-mouseover-effects/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Thu, 21 Apr 2022 23:50:55 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Block editor]]></category>
		<category><![CDATA[Mr.Utils]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2567</guid>

					<description><![CDATA[Know how to add mouseover effects such as zoom, ease in-out, font-size and others, when mouse hovering a block on WordPress using Mr.Utils&#8230; Get mouseover options on the block editor One of the cool features of Mr.Utils is the ability to easily install it as a WordPress plugin for free. When you do so, an [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Know how to add mouseover effects such as zoom, ease in-out, font-size and others, when mouse hovering a block on WordPress using Mr.Utils&#8230;</p>



<span id="more-2567"></span>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong> can be installed as a <strong>WordPress plugin</strong>.<br>Give to the <strong>block editor</strong> super-powers such as <strong>pagination or components</strong> and apply changes <strong>depending of the device</strong>!</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrutils"><strong>Get it now (free)</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading"><strong>Get mouseover options on the block editor</strong></h2>



<p>One of the cool features of <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a> is the ability to easily install it as a WordPress plugin for free.</p>



<p>When you do so, an interface will appear on the block editor, allowing you to easily use the utility classes of this front-end toolkit.</p>



<p>One type of utility class is the mouse hover state, let&#8217;s focus on that for this post.</p>



<p><em>Note: If you prefer, you can <a href="https://github.com/marcosrego-web/mr-utils/wiki#installation" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki#installation" target="_blank" rel="noreferrer noopener">install Mr.Utils</a> without the interface and use the classes on each block Advanced section.</em></p>



<div style="height:30px" aria-hidden="true" class="  wp-block-spacer"></div>


<div class="wp-block-image">
<figure class="     aligncenter size-full"><img loading="lazy" decoding="async" width="275" height="714" src="https://marcosrego.com/wp-content/uploads/2022/04/screenshot-4.png" alt="Mr.Utils interface on block editor showing mouseover options" class="wp-image-2572" title="screenshot 4 - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2022/04/screenshot-4.png 275w, https://marcosrego.com/wp-content/uploads/2022/04/screenshot-4-116x300.png 116w" sizes="auto, (max-width: 275px) 100vw, 275px" /><figcaption class="wp-element-caption">Mr.Utils interface on block editor showing mouse hover options</figcaption></figure></div>


<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Animations</strong></h2>



<p>On the Animation section of the <em>Hover</em> tab (zigzag arrow icon) you will find options such as Fade, Slide, Scale and Zoom.</p>



<p>One thing to keep in mind when selecting one of those options is: By default, the animation will only occur when mouse hovering above the element, nothing will happen when mouse hovering outside the element&#8230; If you want the animation to rollback when you go outside the element, you must go to the <em>Animation</em> section of the <em>Global</em> tab (first tab) and select the transition type (e.g. Ease In Out).<br>Once you apply a transition globally, the animation will react to both hover situations.</p>



<h3 class="  wp-block-heading"><strong>Live example using <em>Zoom</em> animation</strong></h3>



<div style="height:30px" aria-hidden="true" class="  wp-block-spacer"></div>



<p class=" mr-hover-zoom mr-active mr-easeinout mr-hover-easeinout  mr-hover-zoom mr-active  mr-easeinout  mr-hover-easeinout  has-text-align-center mr-hover-zoom mr-active mr-easeinout mr-hover-easeinout"><strong>This paragraph block animates on mouseover!</strong></p>



<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Layout change</strong></h2>



<p>On the <em>Layout</em> section of the <em>Hover</em> tab (zigzag arrow icon) you will find options to change the size (width) of a block.</p>



<p>If you want to change the initial size, simply go to the <em>Layout</em> section on the <em>Global</em> tab (first tab) and find the similar option.</p>



<p>By default, the size will change without any transition/animation. If you want the block to change the size smoothly, you must go to the <em>Animation</em> section of the <em>Global</em> tab and select the transition type (e.g. Ease In Out).</p>



<h3 class="  wp-block-heading"><strong>Live example of size change</strong></h3>


<div class="wp-block-image mr-size11 mr-hover-size13 mr-easeinout">
<figure class="      alignleft size-large"><img loading="lazy" decoding="async" width="1024" height="768" src="https://marcosrego.com/wp-content/uploads/2021/11/screenshot-1024x768.png" alt="Mr.Dev.&#039;s Theme Screenshot" class="wp-image-2481" title="screenshot - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/11/screenshot-1024x768.png 1024w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot-300x225.png 300w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot-768x576.png 768w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">This image will change width on mouseover</figcaption></figure></div>


<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Display changes</strong></h2>



<p>On the <em>Display </em>section of the <em>Hover</em> tab (zigzag arrow icon) you will find options to change the visibility type of a block.</p>



<p><a href="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes#display" target="_blank" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes#display" rel="noreferrer noopener">Here you can better understand the differences between the visibility types.</a></p>



<p>With these options, you can make a block semi-opaque or totally opaque on mouseover. To do the latter, you must first put the block semi-opaque by default on the <em>Display</em> section of the <em>Global</em> tab (you can also use the option on the <em>Desktop</em> tab [screen icon]).</p>



<p>Just like changing the layout, if you want a smooth transition you must choose the transition type on the <em>Animations </em>section (e.g. Ease In Out).</p>



<h3 class="  wp-block-heading"><strong>Live example of visibility change</strong></h3>



<div class="wp-block-buttons is-horizontal is-nowrap is-layout-flex wp-container-core-buttons-is-layout-7 wp-block-buttons-is-layout-flex">
<div class="   mr-semiopaque mr-hover-opaque  mr-semiopaque  mr-hover-opaque  wp-block-button aligncenter mr-semiopaque mr-hover-opaque"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background wp-element-button"><strong>This button will become opaque on mouseover!</strong></a></div>



<div class="   mr-easeinout mr-transparent mr-hover-opaque  mr-easeinout  mr-transparent  mr-hover-opaque  wp-block-button aligncenter mr-easeinout mr-transparent mr-hover-opaque"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background wp-element-button">Hey you found the transparent button also!</a></div>
</div>



<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Spacing changes</strong></h2>



<p>On the <em>Spacing </em>section of the <em>Hover</em> tab (zigzag arrow icon) you will find options to change the spacing (paddings or/and margins) of a block.</p>



<p>Just like changing the layout or display, if you want a smooth transition you must choose the transition type on the <em>Animations </em>section (e.g. Ease In Out) of the <em>Global</em> tab (first tab).</p>



<h3 class="  wp-block-heading"><strong>Live example of paddings change</strong></h3>



<div style="height:30px" aria-hidden="true" class="  wp-block-spacer"></div>



<figure class="   mr-size11 mr-easeinout mr-hover-paddingtop mr-hover-paddingleft mr-marginleft  mr-easeinout  mr-hover-paddingtop  mr-hover-paddingleft  mr-marginleft  wp-block-image size-large mr-size11 mr-easeinout mr-hover-paddingtop mr-hover-paddingleft mr-marginleft"><img loading="lazy" decoding="async" width="1024" height="768" src="https://marcosrego.com/wp-content/uploads/2021/11/screenshot-1024x768.png" alt="Mr.Dev.&#039;s Theme Screenshot" class="wp-image-2481" title="screenshot - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/11/screenshot-1024x768.png 1024w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot-300x225.png 300w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot-768x576.png 768w, https://marcosrego.com/wp-content/uploads/2021/11/screenshot.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">A padding-top and padding-left will be added to this image on mouseover</figcaption></figure>



<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Text size change</strong></h2>



<p>On the <em>Text </em>section of the <em>Hover</em> tab (zigzag arrow icon) you will find options to change the font-size of a block.</p>



<p>Just like changing the layout, display or spacing, if you want a smooth transition you must choose the transition type on the <em>Animations </em>section (e.g. Ease In Out) of the <em>Global</em> tab (first tab).</p>



<h3 class="  wp-block-heading"><strong>Live example of font-size change</strong></h3>



<div style="height:30px" aria-hidden="true" class="  wp-block-spacer"></div>



<p class="mr-hover-fontsize5 mr-easeinout  mr-easeinout  mr-hover-fontsize5 mr-easeinout"><strong><em>This paragraph block will have it&#8217;s font-size increased on mouseover!</em></strong></p>



<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Misc. Changes</strong></h2>



<p>On the <em>Misc. </em>section of the <em>Hover</em> tab (zigzag arrow icon) you will find some extra options such has:</p>



<h3 class="  wp-block-heading"><strong>Showing a scrollbar only when mouse hovering an element</strong></h3>



<p>There are more than 3 images below. Mouseover to see the scrollbar that will allow you to see all of them!</p>



<figure class=" mr-hidescroll mr-horizontalscroll mr-hover-scroll  mr-horizontalscroll  mr-hover-scroll  wp-block-gallery has-nested-images columns-default is-cropped mr-hidescroll mr-horizontalscroll mr-hover-scroll wp-block-gallery-15 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1012" src="https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph.png" alt="Itemzero Open Graph Image" class="wp-image-1012" title="marcosrego itemzero open graph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1013" src="https://marcosrego.com/wp-content/uploads/2021/06/rydoo-marcosrego-opengraph.png" alt="Rydoo Opengraph Image" class="wp-image-1013" title="rydoo marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/rydoo-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/rydoo-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/rydoo-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/rydoo-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1014" src="https://marcosrego.com/wp-content/uploads/2021/03/storylabs-marcosrego-opengraph.png" alt="Storylabs Opengraph Image" class="wp-image-1014" title="storylabs marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/03/storylabs-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/03/storylabs-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/03/storylabs-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/03/storylabs-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1015" src="https://marcosrego.com/wp-content/uploads/2021/03/rubenrdias-marcosrego-opengraph.png" alt="Ruben R. Dias Opengraph Image" class="wp-image-1015" title="rubenrdias marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/03/rubenrdias-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/03/rubenrdias-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/03/rubenrdias-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/03/rubenrdias-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1016" src="https://marcosrego.com/wp-content/uploads/2021/01/gjp-marcosrego-opengraph.png" alt="GJP Opengraph Image" class="wp-image-1016" title="gjp marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/01/gjp-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/01/gjp-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/01/gjp-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/01/gjp-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1017" src="https://marcosrego.com/wp-content/uploads/2020/11/openbook-marcosrego-opengraph.png" alt="Openbook Opengraph Image" class="wp-image-1017" title="openbook marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/11/openbook-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/11/openbook-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/11/openbook-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/11/openbook-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1018" src="https://marcosrego.com/wp-content/uploads/2020/09/cookit-marcosrego-opengraph.png" alt="Cookit Opengraph Image" class="wp-image-1018" title="cookit marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/09/cookit-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/09/cookit-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/09/cookit-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/09/cookit-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1019" src="https://marcosrego.com/wp-content/uploads/2020/09/arhcesmo-marcosrego-opengraph.png" alt="Arhcesmo Opengraph Image" class="wp-image-1019" title="arhcesmo marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/09/arhcesmo-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/09/arhcesmo-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/09/arhcesmo-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/09/arhcesmo-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1020" src="https://marcosrego.com/wp-content/uploads/2020/09/valdorio-marcosrego-opengraph.png" alt="Val do Rio Opengraph Image" class="wp-image-1020" title="valdorio marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/09/valdorio-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/09/valdorio-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/09/valdorio-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/09/valdorio-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1026" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph.png" alt="Mr.Dev.&#039;s Framework Opengraph Image" class="wp-image-1026" title="mrdevframework marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1027" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevwidget-marcosrego-opengraph.png" alt="Mr.Dev.&#039;s Widget Opengraph Image" class="wp-image-1027" title="mrdevwidget marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevwidget-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevwidget-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevwidget-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevwidget-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1028" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevmodule-marcosrego-opengraph.png" alt="Mr.Dev.&#039;s Module Opengraph Image" class="wp-image-1028" title="mrdevmodule marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevmodule-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevmodule-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevmodule-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevmodule-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1029" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1031" src="https://marcosrego.com/wp-content/uploads/2021/06/editor4roks-marcosrego-opengraph.png" alt="editor4roks Opengraph Image" class="wp-image-1031" title="editor4roks marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/06/editor4roks-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/06/editor4roks-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/editor4roks-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/editor4roks-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1221" src="https://marcosrego.com/wp-content/uploads/2021/04/giftncraft-marcosrego-opengraph.png" alt="Gift &amp; Craft Opengraph Image" class="wp-image-1221" title="giftncraft marcosrego opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/04/giftncraft-marcosrego-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/04/giftncraft-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/04/giftncraft-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/04/giftncraft-marcosrego-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1330" src="https://marcosrego.com/wp-content/uploads/2020/11/emergencia-alimentar-marcosrego-site-opengraph.png" alt="Rede de Emergência Alimentar Open Graph Image" class="wp-image-1330" title="emergencia alimentar marcosrego site opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/11/emergencia-alimentar-marcosrego-site-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/11/emergencia-alimentar-marcosrego-site-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/11/emergencia-alimentar-marcosrego-site-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/11/emergencia-alimentar-marcosrego-site-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1838" src="https://marcosrego.com/wp-content/uploads/2020/09/cascade-marcosrego-site-opengraph.png" alt="Cascade website Opengraph Image" class="wp-image-1838" title="cascade marcosrego site opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2020/09/cascade-marcosrego-site-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2020/09/cascade-marcosrego-site-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2020/09/cascade-marcosrego-site-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2020/09/cascade-marcosrego-site-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>



<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1200" height="630" data-id="1813" src="https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph.png" alt="Ressano Garcia Arquitectos Open Graph Image" class="wp-image-1813" title="ressanogarciaarquitectos marcosrego site opengraph - More than 6 essential mouseover effects for the block editor" srcset="https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph.png 1200w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-768x403.png 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></figure>
</figure>



<div style="height:30px" aria-hidden="true" class="  wp-block-spacer"></div>



<p>Those were very basic examples, but with some creativity you can use them to make fascinating and useful experiences for your website users 🙂</p>



<div style="height:50px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to create block patterns in WordPress</title>
		<link>https://marcosrego.com/blog/create-block-patterns/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Sun, 27 Feb 2022 15:47:54 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Block editor]]></category>
		<category><![CDATA[For clients and authors]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2515</guid>

					<description><![CDATA[At the moment of writing, WordPress does not yet give an interface for editors to create block patterns. But that doesn&#8217;t mean it&#8217;s difficult to create them without an interface. On this post, I&#8217;ll guide you on how you can create patterns, and I&#8217;ll try to make it as friendly as possible. Create a block [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-2515"></span>
<!--noteaser-->



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><a href="https://marcosrego.com/development/mrdev-framework/"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png" alt="Mr.Dev.&#039;s Framework Opengraph Image" class="wp-image-1026" title="mrdevframework marcosrego opengraph - How to create block patterns in Wordpress" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="  has-main-text-color-color has-text-color">When <strong>Mr.Dev.</strong> sells his <strong>framework</strong>, <strong>one unique payment</strong> gives you <strong>updates forever</strong> and for <strong>unlimited websites</strong>!</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/development/mrdev-framework/"><strong>Know more</strong></a></div>
</div>
</div></section>
</div></aside>



<p>At the moment of writing, WordPress does not yet give an interface for editors to create block patterns. But that doesn&#8217;t mean it&#8217;s difficult to create them without an interface. On this post, I&#8217;ll guide you on how you can create patterns, and I&#8217;ll try to make it as friendly as possible.</p>



<h2 class="wp-block-heading"><strong>Create a block pattern with Mr.Dev.&#8217;s Framework</strong></h2>



<p>Currently, there&#8217;s no graphic user interface to create block patterns. <a href="https://marcosrego.com/development/mrdev-framework/" data-type="post" data-id="403">Mr.Dev.&#8217;s Framework</a> only adds options that WordPress does not have by default, and I&#8217;m expecting WordPress to create that default interface very soon. For that reason, I&#8217;ll not add a specific interface for this functionality<em> (this might change if WordPress takes too much time to do it)</em>.</p>



<p>But if you can&#8217;t wait for that to happen, Mr.Dev.&#8217;s Framework can still help you on the process&#8230;</p>



<h2 class="wp-block-heading"><strong>Preparing a file for a <strong>WordPress</strong></strong> <strong>code snippet</strong></h2>



<h3 class="  wp-block-heading"><strong>Prepare it using Mr.Dev.&#8217;s Framework</strong></h3>



<ul class="wp-block-list">
<li>If you have Mr.Dev.&#8217;s Framework, check if the option to control files is enabled: If you see the tab <em>Files / Media</em> that means it is, if not then you can enable it on the <em>Configuration</em> tab on the <em>Files &amp; Media Manager</em> section.</li>



<li>Go to the <em>Files / Media</em> tab , there you can find the section <em>Server-side scripts</em>. Click on the pencil icon to open the file.<br>This is the file where you&#8217;ll add a <a href="#block_patterns_code_snippet">short code snippet</a>.</li>
</ul>



<p></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-2 wp-block-columns-is-layout-flex">
<div class="  wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:57%">
<figure class="    wp-block-image size-full"><a href="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-enable-files-control.jpg"><img loading="lazy" decoding="async" width="906" height="313" src="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-enable-files-control.jpg" alt="Mr.Dev.&#039;s Framework - Enable Files Control" class="wp-image-2539" title="mrdev framework enable files control - How to create block patterns in Wordpress" srcset="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-enable-files-control.jpg 906w, https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-enable-files-control-300x104.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-enable-files-control-768x265.jpg 768w" sizes="auto, (max-width: 906px) 100vw, 906px" /></a><figcaption class="wp-element-caption">Mr.Dev.&#8217;s Framework &#8211; Enable Files Control</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="    wp-block-image size-full"><a href="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-files-control-php.jpg"><img loading="lazy" decoding="async" width="533" height="248" src="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-files-control-php.jpg" alt="Mr.Dev.&#039;s Framework - Adding/editing PHP servser-sides cripts" class="wp-image-2541" title="mrdev framework files control php - How to create block patterns in Wordpress" srcset="https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-files-control-php.jpg 533w, https://marcosrego.com/wp-content/uploads/2022/02/mrdev-framework-files-control-php-300x140.jpg 300w" sizes="auto, (max-width: 533px) 100vw, 533px" /></a><figcaption class="wp-element-caption">Mr.Dev.&#8217;s Framework &#8211; Adding/editing PHP servser-sides cripts</figcaption></figure>
</div>
</div>



<h3 class="  wp-block-heading"><strong>Prepare it using a custom PHP file</strong></h3>



<p>If you don&#8217;t have Mr.Dev.&#8217;s Framework and already have a way to add PHP code snippets to your website, you can skip directly to add the <a href="#block_patterns_code_snippet">code snippet</a>.</p>



<p>Otherwise, you can <a href="https://marcosrego.com/development/mrdev-framework/" data-type="post" data-id="403">get the framework</a> or <a href="#block_patterns_code_snippet">add the code</a> into the <em>functions.php</em> file of your theme.</p>



<h2 class="wp-block-heading"><strong>Block patterns code snippet</strong></h2>



<ul class="wp-block-list">
<li>Copy the code snippet below and paste it into the file you previously created/selected. Do not save yet because we still need to create the actual pattern.</li>
</ul>



<pre class="mr-fontsize2  wp-block-code mr-fontsize2"><code>//START BLOCK PATTERNS
function custom_site_init() {
	register_block_pattern_category(
		'custom-site',
		array( 'label' =&gt; get_bloginfo() )
	);
	
	register_block_pattern(
		'custom-site/project-list',
		array(
			'title'       =&gt; __( 'Pattern 1', 'custom-site' ),
			'description' =&gt; _x( '', 'Block pattern description', 'custom-site' ),
			'keywords' =&gt; &#91;'pattern'],
			'categories' =&gt; &#91;'custom-site'],
			'content'     =&gt; 'PATTERN CONTENT',
		)
	); 
}
add_action( 'init', 'custom_site_init' );
//END BLOCK PATTERNS</code></pre>



<h3 class="  wp-block-heading"><strong>Understanding the code</strong> (optional)</h3>



<p>The code above can be reused on as many websites as you want.</p>



<p>It will automatically create a pattern&#8217;s category with the same name as the website using <em>get_bloginfo()</em> <em>(behind the scenes the slug will be &#8220;custom-site&#8221;, and although you can change that, it is more scalable this way)</em>.</p>



<p>The pattern name will be &#8220;Pattern 1&#8221;, this part you can change to whatever you want, depending on the project or the actual pattern.</p>



<p>You can also add a pattern description and add/replace keywords <em>(The keywords are utilized when a user is using the search input to find blocks)</em>.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-16 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1717" height="756" data-id="2540" src="https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01.jpg" alt="Code snippet to create block patterns" class="wp-image-2540" title="create block patterns 01 - How to create block patterns in Wordpress" srcset="https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01.jpg 1717w, https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01-300x132.jpg 300w, https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01-1024x451.jpg 1024w, https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01-768x338.jpg 768w, https://marcosrego.com/wp-content/uploads/2022/02/create-block-patterns-01-1536x676.jpg 1536w" sizes="auto, (max-width: 1717px) 100vw, 1717px" /><figcaption class="wp-element-caption">Code snippet to create block patterns</figcaption></figure>
</figure>



<h2 class="wp-block-heading"><strong>Create the block pattern with the editor</strong></h2>



<p>Now that we have prepared the code snippet, we can use the block editor to create the content for the pattern.</p>



<ul class="wp-block-list">
<li>On a different tab, go to <em>Pages &gt; Add New</em>.</li>



<li>Create the content for the patterns, using any type of blocks you want.</li>



<li>In the top right corner, click on the 3 dots.</li>



<li>Click on &#8220;Copy all content&#8221;.</li>



<li>Go back to the PHP file you previously created/selected.</li>



<li>Replace <em>PATTERN CONTENT</em> with the content you just copied.</li>



<li>Save the file.</li>
</ul>



<p></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-3 wp-block-columns-is-layout-flex">
<div class="  wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-17 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="337" height="677" src="https://marcosrego.com/wp-content/uploads/2022/02/block-editor-copy-all-content.png" alt="Block editor - Copy all content - Option location" class="wp-image-2546" title="block editor copy all content - How to create block patterns in Wordpress" srcset="https://marcosrego.com/wp-content/uploads/2022/02/block-editor-copy-all-content.png 337w, https://marcosrego.com/wp-content/uploads/2022/02/block-editor-copy-all-content-149x300.png 149w" sizes="auto, (max-width: 337px) 100vw, 337px" /><figcaption class="wp-element-caption">Block editor &#8211; Copy all content &#8211; Option location</figcaption></figure>
</figure>
</div>
</div>



<h2 class="wp-block-heading"><strong>Add more block patterns</strong></h2>



<p>To create multiple block patterns, duplicate the function <em>register_block_pattern</em> from the code snippet above and repeat the same steps.</p>



<h2 class="wp-block-heading"><strong>Extra: Remove core block patterns from WordPress</strong></h2>



<p>Now that you added your own custom patterns, chances are you don&#8217;t want to show the default/core block patterns. </p>



<p>To do that, if you have Mr.Dev.&#8217;s Framework, you can simply enable <em>Styles Control</em> on the <em>Configuration tab</em>. Otherwise, you can add the following code on the previous code snippet, inside the main <em>custom_site_init</em> function:</p>



<pre class="mr-fontsize2  wp-block-code mr-fontsize2"><code>remove_theme_support( 'core-block-patterns' );</code></pre>



<h2 class="wp-block-heading"><strong>Will block patterns be on the interface?</strong></h2>



<p>Hopefully WordPress will soon add a good way to do this via the full site editor. There are some interesting discussions on which will be the best way, you can follow them:</p>



<ul class="wp-block-list">
<li><a href="https://github.com/WordPress/gutenberg/issues/31298" target="_blank" rel="noreferrer noopener">Patterns: Create a pattern similarly to how we create a Reusable block. · Issue #31298 · WordPress/Gutenberg (github.com)</a></li>



<li><a href="https://github.com/WordPress/gutenberg/issues/35305" target="_blank" rel="noopener">Selecting multiple blocks &#8211; Save as Pattern or Reusable block. · Issue #35305 · WordPress/gutenberg (github.com)</a></li>



<li><a href="https://github.com/WordPress/gutenberg/issues/38529" target="_blank" rel="noopener">Building with Patterns · Issue #38529 · WordPress/gutenberg (github.com)</a></li>
</ul>



<p>And that&#8217;s it! I hope the steps were clear and easy to follow. If not, feel free to comment below or <a href="https://marcosrego.com/client-area/contact/" data-type="post" data-id="678">contact me</a> if you prefer to talk about it privately.</p>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Properly use webmail for the most common email tasks</title>
		<link>https://marcosrego.com/blog/4-common-webmail-tasks-hostinger/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Mon, 06 Dec 2021 19:10:22 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[For clients and authors]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2233</guid>

					<description><![CDATA[Learn when using webmail is better than apps and how to create signatures, filters for spam/urgencies, auto replies/out-of-office and redirect emails. I include emails on hosting maintenance One of the things I provide on the hosting maintenance (for clients with websites I developed) is a basic email service. I manage the service of a third-party [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Learn when using webmail is better than apps and how to create signatures, filters for spam/urgencies, auto replies/out-of-office and redirect emails.</p>



<span id="more-2233"></span>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/07/maintenance-marcosrego-opengraph-1024x538.png" alt="Marcos Rego Maintenance Opengraph Image" class="wp-image-1022" title="maintenance marcosrego opengraph - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/07/maintenance-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/07/maintenance-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/07/maintenance-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/07/maintenance-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong>All registered users</strong> get access to more sections of the website, including a <strong>client area,</strong> where it is possible to <strong>check the status and renew maintenance services</strong> via online-payment.</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background wp-element-button" href="https://marcosrego.com/./client-area/"><strong>go to client area</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading" id="i-include-emails-on-hosting-maintenance"><strong>I include emails on hosting maintenance</strong></h2>



<p>One of the things I provide on the hosting maintenance (for clients with websites I developed) is a basic email service.</p>



<p>I manage the service of a third-party company, so you don&#8217;t have to (You can know everything that is included on the service on the <a href="https://marcosrego.com/client-area/maintenance/" data-type="post" data-id="782">Maintenance page</a> of the client area).</p>



<p>Emails can be accessed via <strong>webmail</strong> or email clients (such as Thunderbird, Outlook, etc).</p>



<figure class="    wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-18 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-full"><img loading="lazy" decoding="async" width="774" height="211" data-id="1768" src="https://marcosrego.com/wp-content/uploads/2021/08/email-clients.png" alt="Apple Mail, Google Mail, Thunderbird and Outlook" class="wp-image-1768" title="email clients - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/08/email-clients.png 774w, https://marcosrego.com/wp-content/uploads/2021/08/email-clients-300x82.png 300w, https://marcosrego.com/wp-content/uploads/2021/08/email-clients-768x209.png 768w" sizes="auto, (max-width: 774px) 100vw, 774px" /><figcaption class="wp-element-caption">Some email clients</figcaption></figure>
</figure>



<h2 class="wp-block-heading" id="webmail-vs-email-clients"><strong>Webmail vs Email clients</strong></h2>



<p>You can use email clients to create folders, filter emails, create signatures and other common email tasks, but many of those features will only be visible on that client on that device.</p>



<p>Spam filters on email clients, for example, might filter the emails you see but not filter directly on the server.<br><br><strong>Webmail, on the other hand, provides direct access to the emails hosted on the server.</strong></p>



<p>Filters, auto responders (aka out of offices) that you create on webmail, will be available on any client or device that you use.<br><br>On this post, I&#8217;ll show how you can do the most common email tasks using the webmail service I provide via the third-party company <a href="https://hostinger.com/" target="_blank" data-type="URL" data-id="https://hostinger.com/" rel="noreferrer noopener">Hostinger.</a></p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-19 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="517" data-id="1774" src="https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail-1024x517.png" alt="Hostinger Webmail" class="wp-image-1774" title="Hostinger Webmail - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail-1024x517.png 1024w, https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail-768x388.png 768w, https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail-1536x775.png 1536w, https://marcosrego.com/wp-content/uploads/2021/08/Hostinger-Webmail.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Hostinger is one of the many hosts providing emails. Including webmail access.</figcaption></figure>
</figure>



<h2 class="wp-block-heading" id="how-to-use-webmail-for-common-email-tasks"><strong>How to use webmail for common email tasks</strong></h2>



<p>First, let&#8217;s log in, go to <a href="https://mail.hostinger.com/" target="_blank" rel="noreferrer noopener">mail.hostinger.com</a> and use the credentials of your account.</p>



<p>If you don&#8217;t remember the credentials, click on &#8220;Forgot password&#8221;. If still you can&#8217;t log in, and I&#8217;m the one managing the hosting service for you, feel free to <a href="https://marcosrego.com/client-area/contact/" data-type="post" data-id="678">contact me</a>. I can reset the password for you, create new addresses, or do some troubleshooting.</p>



<h3 class="  wp-block-heading" id="email-filters"><strong>Email filters</strong></h3>



<p>Email filters allow you to automatically organize your emails depending on whose sending, depending on the email subject and of the content.</p>



<div style="height:25px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading" id="spam-filters"><strong>Spam filters</strong></h4>



<p>Let&#8217;s say you are receiving emails that should be spam, from a domain you don&#8217;t trust or simply don&#8217;t want to receive their emails.</p>



<p>Go to Settings &gt; Filters, click on &#8220;Create&#8221; and check the suggestions on the image below. The key part of this filter is the action, set to move messages with specific rules to the &#8220;Junk&#8221; folder.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-20 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego.png"><img loading="lazy" decoding="async" width="1024" height="514" data-id="2235" src="https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego-1024x514.png" alt="Email filters for unwanted emails" class="wp-image-2235" title="unwanted email filters webmail marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego-1024x514.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego-300x150.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego-768x385.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego-1536x770.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/unwanted-email-filters-webmail-marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Common email filters for unwanted emails. Replace abaddomain.com with an unwanted domain you are receiving emails from.</figcaption></figure>
</figure>



<div style="height:25px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading" id="filters-for-urgent-or-important-emails"><strong>Filters for urgent or important emails</strong></h4>



<p>Let&#8217;s say some of your colleagues, sharing the same domain as you, usually send you important emails but sometimes with many links or without subject. Those emails might be considered spam by mistake. You can create a filter that will force emails from the same domain as you to always be sent to the &#8220;Inbox&#8221; folder.</p>



<p>Go to Settings &gt; Filters, click on &#8220;Create&#8221; and check the suggestions on the image below. </p>



<p>Or let&#8217;s say you are waiting for an important email from a certain domain, you can also move those messages automatically to a custom folder (to create folders go to Settings &gt; Folders).</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-21 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego.png"><img loading="lazy" decoding="async" width="1024" height="515" data-id="2237" src="https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego-1024x515.png" alt="Urgent email filters webmail" class="wp-image-2237" title="urgent email filters webmail marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego-1024x515.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego-768x386.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego-1536x772.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/urgent-email-filters-webmail-marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">You can use a filter to force emails from the same domain to always go to your inbox.</figcaption></figure>
</figure>



<div style="height:25px" aria-hidden="true" class="  wp-block-spacer"></div>



<h3 class="  wp-block-heading" id="redirect-emails-to-a-preferred-address"><strong>Redirect emails to a preferred address</strong></h3>



<p>Also, using filters, you can redirect certain messages or all of them to a specific address.</p>



<p>Go to Settings &gt; Filters, click on &#8220;Create&#8221; and check the suggestions on the image below.</p>



<p>The key option is setting the action to &#8220;Redirect message to&#8221;.</p>



<p>This can be very useful if you have multiple or parked domains (such as .pt and .com) and you only want to manage your messages from one address.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-22 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="515" data-id="2373" src="https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego-1024x515.png" alt="Setting email redirect on webmail" class="wp-image-2373" title="setting redirect email webmail marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego-1024x515.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego-768x386.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego-1536x772.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/setting-redirect-email-webmail_marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Setting email redirects using webmail</figcaption></figure>
</figure>



<h3 class="  wp-block-heading" id="auto-responders-out-of-office"><strong>Auto responders (out of office)</strong></h3>



<p>Currently, the webmail of Hostinger does not permit to send auto responders. You have two options:</p>



<div style="height:25px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading" id="1-auto-responders-via-the-hosting-panel"><strong>1- Auto responders via the hosting panel</strong></h4>



<p>On the hosting panel of Hostinger you can create your auto responders, but not everyone can have access to that panel. </p>



<p>If you don&#8217;t have access, being my client you can <a href="https://marcosrego.com/client-area/contact/">contact me</a>, to request the creation of the auto-responder for free or to upgrade your maintenance with a professional email service for an extra cost.</p>



<p>If you already have access, check the image below to understand where and how to set your autoresponders:</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-23 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego.png"><img loading="lazy" decoding="async" width="1024" height="514" data-id="2242" src="https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego-1024x514.png" alt="Autoreply hostinger panel" class="wp-image-2242" title="autoreply hostinger panel marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego-1024x514.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego-768x386.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego-1536x771.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/autoreply-hostinger-panel-marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Setting auto replies for out of office warnings and other situations  using Hostinger&#8217;s panel</figcaption></figure>
</figure>



<div style="height:25px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading" id="2-alternative-is-sending-the-email-to-someone-who-s-available"><strong>2- Alternative is sending the email to someone who&#8217;s available</strong></h4>



<p>Just like creating email filters, you can create a filter to send all messages to a colleague or friend who&#8217;s available to answer.</p>



<p>Check the image below, the trick is setting the scope of the filter to &#8220;All messages&#8221;:</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-24 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego.png"><img loading="lazy" decoding="async" width="1024" height="515" data-id="2243" src="https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego-1024x515.png" alt="Send emails to colleague webmail marcosrego" class="wp-image-2243" title="send emails to colleague webmail marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego-1024x515.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego-768x386.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego-1536x772.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/send-emails-to-colleague-webmail-marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Sending your emails to a colleague when you are not available</figcaption></figure>
</figure>



<h3 class="  wp-block-heading" id="email-signatures"><strong>Email signatures</strong></h3>



<p>If you want to create an email signature directly on the webmail, you can do it.</p>



<p>Go to Settings &gt; Identities and write your signature on the text area. Click on the icon on the editor to allow HTML and the visual editor, to easily add images, indents, lines and more.</p>



<p>If you want to do something prettier, you can get a signature code and click on the &lt;&gt; icon to add HTML. <a href="https://marcosrego.com/client-area/contact/" data-type="post" data-id="678">Contact me</a> if you want a custom-made one 😉</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-25 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><a href="https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego.png"><img loading="lazy" decoding="async" width="1024" height="514" data-id="2245" src="https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego-1024x514.png" alt="Setting an email signature using webmail" class="wp-image-2245" title="setting a email signature webmail marcosrego - Properly use webmail for the most common email tasks" srcset="https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego-1024x514.png 1024w, https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego-300x151.png 300w, https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego-768x386.png 768w, https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego-1536x771.png 1536w, https://marcosrego.com/wp-content/uploads/2021/12/setting-a-email-signature-webmail-marcosrego.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Setting an email signature using webmail</figcaption></figure>
</figure>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get 5 official block editor features with any theme</title>
		<link>https://marcosrego.com/blog/block-editor-features-theme/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Mon, 01 Nov 2021 10:00:00 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Block editor]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Mr.Dev.'s Framework]]></category>
		<category><![CDATA[Support]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=2106</guid>

					<description><![CDATA[The block editor (aka Gutenberg) is the default site builder of WordPress but some handy features might be hidden, waiting for your theme to declare support. Which block editor features can be enabled? Features such as creation of block templates, responsive embeds, wide alignments for images, custom line-heights and custom spacing usually must be enabled [&#8230;]]]></description>
										<content:encoded><![CDATA[<span id="more-2106"></span>
<!--noteaser-->



<p class="">The block editor (aka Gutenberg) is the default site builder of WordPress but some handy features might be hidden, waiting for your theme to declare support.</p>



<h2 class="wp-block-heading"><strong>Which block editor features can be enabled?</strong></h2>



<p class="">Features such as <strong>creation of block templates, responsive embeds, wide alignments for images, custom line-heights and custom spacing</strong> usually must be enabled by <a href="https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/" target="_blank" data-type="URL" data-id="https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/" rel="noreferrer noopener">adding some code snippets into your theme</a>.</p>



<p class="">But what if you don&#8217;t have control over your theme code? What if you want to always have those features despite the theme you use?</p>



<p class="">Since the version 0.9.492 of <a href="https://marcosrego.com/development/mrdev-framework/" data-type="post" data-id="403">Mr.Dev.&#8217;s Framework</a>, that you can enable all those features without touching any code.</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><a href="https://marcosrego.com/development/mrdev-framework/"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png" alt="Mr.Dev.&#039;s Framework Opengraph Image" class="wp-image-1026" title="mrdevframework marcosrego opengraph - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdevframework-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p class="  has-main-text-color-color has-text-color">When <strong>Mr.Dev.</strong> sells his <strong>framework</strong>, <strong>one unique payment</strong> gives you <strong>updates forever</strong> and for <strong>unlimited websites</strong>!</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/development/mrdev-framework/"><strong>Know more</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading"><strong>How to get those block editor features?</strong></h2>



<p class="">On the <strong>Configuration tab</strong> of <strong><a href="https://marcosrego.com/development/mrdev-framework/" data-type="post" data-id="403">Mr.Dev.&#8217;s Framework</a></strong>, located in <strong>Settings > Mr.Dev.</strong> <em>(Instead of Mr.Dev. you might see your site name, depending of the whitelabel configuration)</em>, you can find the section <strong>Styles Configuration</strong> with the dropdown <strong>Blocks Styles Picker</strong> and also the section <strong>Layout configuration</strong> with the dropdown <strong>Layout Control</strong>.</p>



<figure class="  wp-block-gallery columns-1 is-cropped wp-block-gallery-26 is-layout-flex wp-block-gallery-is-layout-flex"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><a href="https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features.png"><img loading="lazy" decoding="async" width="1008" height="611" src="https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features.png" alt="Mr.Dev.&#039;s Framework - Block Features" data-id="2137" data-full-url="https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features.png" data-link="https://marcosrego.com/blog/block-editor-features-theme/attachment/mrdev-framework-block-features/" class="wp-image-2137" title="mrdev framework block features - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features.png 1008w, https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features-300x182.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/mrdev-framework-block-features-768x466.png 768w" sizes="auto, (max-width: 1008px) 100vw, 1008px" /></a><figcaption class="blocks-gallery-item__caption">Block Styles Picker also allows to enable extra features of the block editor (aka Gutenberg).<br>(Screenshot taken on October 2021)</figcaption></figure></li></ul></figure>



<p class="">Depending of the option you choose on those dropdowns, different features will be enabled:</p>



<h3 class="  wp-block-heading"><strong>Block templates</strong></h3>



<p class="">If your theme already enables block templates, you can leave the dropdown <strong>Layout Control</strong> with the option &#8220;Disabled / Theme Controlled&#8221;, otherwise you can select &#8220;Enable block templates (Recommended)&#8221;.</p>



<p class="">You&#8217;ll also need to have WordPress 5.8 or above. </p>



<p class="">The <strong>Block templates</strong> feature, allows to add blocks inside template parts such as header and footer. All changes you do on a block inside a template part will apply to all pages using that template.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-4 wp-block-columns-is-layout-flex">
<div class=" mr-phone-hide  wp-block-column mr-phone-hide is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:16%">
<figure class="    wp-block-image size-full"><img loading="lazy" decoding="async" width="298" height="688" src="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-option.png" alt="block editor template option - Get 5 official block editor features with any theme" class="wp-image-2145" title="block editor template option - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-option.png 298w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-option-130x300.png 130w" sizes="auto, (max-width: 298px) 100vw, 298px" /></figure>
</div>



<div class="  wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:78%">
<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="482" src="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor-1024x482.png" alt="Block editor template editor" class="wp-image-2146" title="block editor template editor - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor-1024x482.png 1024w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor-300x141.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor-768x362.png 768w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor-1536x724.png 1536w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-template-editor.png 1908w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>
</div>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h3 class="  wp-block-heading"><strong>Responsive embeds</strong></h3>



<p class="">This block editor feature will be enabled if you select one of this options:</p>



<ul class="wp-block-list"><li><strong>Disabled but with extra block features</strong> &#8211; It will not show the colors and sizes created using the framework (or the customizer) inside the block editor.</li><li><strong>Enabled with extra block features and allow custom styles</strong></li><li><strong>Enabled with extra block features</strong></li></ul>



<p class="">The <strong>Responsive embeds</strong> feature, automatically applies styles to embedded content to reflect the aspect ratio of content that is embedded in an iFrame, using the class <em>wp-embed-responsive</em> on the &lt;body&gt;.</p>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h3 class="  wp-block-heading"><strong>Wide Alignment</strong></h3>



<p class="">This block editor feature will be enabled if you select one of this options:</p>



<ul class="wp-block-list"><li><strong>Disabled but with extra block features</strong> &#8211; It will not show the colors and sizes created using the framework (or the customizer) inside the block editor.</li><li><strong>Enabled with extra block features and allow custom styles</strong></li><li><strong>Enabled with extra block features</strong></li></ul>



<p class="">The <strong>Wide Alignment </strong>feature, gives the possibility of defining &#8220;wide&#8221; and &#8220;full&#8221; alignments to certain blocks, such as the image block.</p>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="578" src="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-wide-alignment-1024x578.png" alt="Block editor wide alignment" class="wp-image-2152" title="block editor wide alignment - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-wide-alignment-1024x578.png 1024w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-wide-alignment-300x169.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-wide-alignment-768x433.png 768w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-wide-alignment.png 1453w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h3 class="  wp-block-heading"><strong>Custom Line-Height</strong></h3>



<p class="">This block editor feature will be enabled if you select one of this options:</p>



<ul class="wp-block-list"><li><strong style="color: var(--main-text-color) ; font-family: var(--text-font, &quot;Arial,Helvetica Neue,Helvetica&quot;); background-color: var(--main-background-color, #dfdfd0);">Enabled with extra block features and allow custom styles</strong></li><li><strong><strong>Enabled and allow custom styles per block</strong></strong></li></ul>



<p class="">The <strong>Custom Line-Height</strong> feature, allows to customize the line height of certain blocks, such as the paragraph and headings.</p>



<figure class="    wp-block-image size-full"><img loading="lazy" decoding="async" width="776" height="280" src="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-paragraph-line-height.png" alt="Block editor paragraph line-height" class="wp-image-2153" title="block editor paragraph line height - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-paragraph-line-height.png 776w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-paragraph-line-height-300x108.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-paragraph-line-height-768x277.png 768w" sizes="auto, (max-width: 776px) 100vw, 776px" /></figure>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h3 class="  wp-block-heading"><strong>Custom Spacing</strong></h3>



<p class="">This block editor feature will be enabled if you select one of this options:</p>



<ul class="wp-block-list"><li><strong style="color: var(--main-text-color) ; font-family: var(--text-font, &quot;Arial,Helvetica Neue,Helvetica&quot;); background-color: var(--main-background-color, #dfdfd0);">Enabled with extra block features and allow custom styles</strong></li><li><strong><strong>Enabled and allow custom styles per block</strong></strong></li></ul>



<p class="">The <strong>Custom Spacing</strong> feature, will show padding controls in certain blocks, such as the column block. You can change the value for individual sides or keep the same for all sides.</p>



<figure class="    wp-block-image size-full"><img loading="lazy" decoding="async" width="774" height="599" src="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-padding-spacing.png" alt="Block editor padding spacing" class="wp-image-2156" title="block editor padding spacing - Get 5 official block editor features with any theme" srcset="https://marcosrego.com/wp-content/uploads/2021/10/block-editor-padding-spacing.png 774w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-padding-spacing-300x232.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/block-editor-padding-spacing-768x594.png 768w" sizes="auto, (max-width: 774px) 100vw, 774px" /></figure>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<p class=""><strong><span style="color: var(--main-text-color) ; font-family: var(--text-font, &quot;Arial,Helvetica Neue,Helvetica&quot;); background-color: var(--main-background-color, #dfdfd0);">And the </span><em>Enabled</em><span style="color: var(--main-text-color) ; font-family: var(--text-font, &quot;Arial,Helvetica Neue,Helvetica&quot;); background-color: var(--main-background-color, #dfdfd0);"> option on the dropdown?</span></strong></p>



<p class="">It&#8217;s not part of this post&#8217;s topic, but if you prefer to let your theme/plugins decide most of the available features, but still want to show the colors and sizes created using the framework (or the customizer) on the block editor, then that option is for you.</p>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2 class="wp-block-heading"><strong>Getting Mr.Dev.&#8217;s Framework</strong></h2>



<p class="">If this easy method to enable block editor features despite the theme sounds good to you, but you don&#8217;t have this framework yet, then you can know more about it and get it anytime:</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrdevs-framework">Get it now</a></div>



<div class="   wp-block-button"><a class="wp-block-button__link has-main-background-color-color has-main-text-color-background-color has-text-color has-background" href="https://marcosrego.com/development/mrdev-framework/">Know more</a></div>
</div>



<div style="height:20px" aria-hidden="true" class="  wp-block-spacer"></div>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mr.Utils enhances the block editor with 8 extra features</title>
		<link>https://marcosrego.com/blog/mr-utils-block-editor-features/</link>
		
		<dc:creator><![CDATA[Marcos Rego]]></dc:creator>
		<pubDate>Wed, 13 Oct 2021 23:11:57 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Block editor]]></category>
		<category><![CDATA[For clients and authors]]></category>
		<category><![CDATA[For developers]]></category>
		<category><![CDATA[Mr.Utils]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://marcosrego.com/?p=1997</guid>

					<description><![CDATA[On this post, I&#8217;ll guide you on how to use my front-end toolkit Mr.Utils, to scale and get features on the block editor of WordPress. As explained on the previous post, a front-end toolkit might be the best future-proof and optimized solution to this site builder that is still growing. Depending of your website and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class=""> On this post, I&#8217;ll guide you on how to use my front-end toolkit <strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong>, to scale and get features on the block editor of <a href="https://marcosrego.com/tag/wordpress/" data-type="post_tag" data-id="23">WordPress</a>.</p>



<span id="more-1997"></span>



<p class="">As explained on the <a href="https://marcosrego.com/blog/solve-block-editor-toolkit/" data-type="post" data-id="1878">previous post</a>, a front-end toolkit might be the best future-proof and optimized solution to this site builder that is still growing.</p>



<p class="">Depending of your website and theme configuration, you might already be able to use the editor to change things such as the font-size, margins and paddings. But those changes would be made on each block individually, there&#8217;s currently at the moment of writing, no way to change those properties globally. <strong>Mr.Utils</strong> gives you a way to do that.</p>



<aside class="  wp-block-group sidebar has-main-text-color-color has-aside-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<section class="wp-block-group has-main-text-color-color has-main-background-color-background-color has-text-color has-background"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h3 class="   has-main-text-color-color has-text-color wp-block-heading"><strong>Did you know?</strong></h3>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png" alt="Mr.Utils Opengraph Image" class="wp-image-1029" title="mrutils marcosrego opengraph - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrutils-marcosrego-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="  has-main-text-color-color has-text-color"><strong><a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a></strong> gives you a set of classes with a clear syntax, such as <em><strong>mr-phone-hide</strong></em> clearly saying to hide an element on a phone, <strong><em>mr-marginright</em></strong> to add a margin on the right side of an element and <strong><a rel="noreferrer noopener" href="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Utility-Classes" target="_blank">so much more</a></strong>&#8230;</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="   wp-block-button"><a class="wp-block-button__link has-invert-color-color has-link-color-background-color has-text-color has-background" href="https://marcosrego.com/client-area/downloads/?product=mrutils"><strong>Get it now (free)</strong></a></div>
</div>
</div></section>
</div></aside>



<h2 class="wp-block-heading"><strong>Installing Mr.Utils to use on the block editor</strong></h2>



<p class="">On  the<strong> <a href="https://github.com/marcosrego-web/mr-utils/wiki#installation" target="_blank" rel="noreferrer noopener">documentation</a></strong> you&#8217;ll find a short and easy explanation on three methods to install <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a>, by using Mr.Dev.&#8217;s Framework, by installing as a plugin or via manual installation. The most optimized method is using the framework because it allows you to select the type of utilities you want to use, combine and minify them.</p>



<p class=""></p>



<h3 class="  wp-block-heading"><strong>Preview Mr.Utils changes on the block editor (Optional)</strong></h3>



<p class="">Because the block editor is a very visual editor that closely resembles the front-end, you might want to see the changes that Mr.Utils will apply to your blocks, before actually saving the post.</p>



<p class="">If you did the installation as a plugin you don&#8217;t need to do anything else and you can skip to &#8220;<em><a href="#how_to_use_mrutils_features_on_the_block_editor">How to use Mr.Utils features on the block editor</a></em>&#8220;.</p>



<p class="">Otherwise, you can configure it easily by using <a href="https://marcosrego.com/development/mrdev-framework/" data-type="post" data-id="403">Mr.Dev.&#8217;s Framework</a>, or manually if that&#8217;s your thing.</p>



<div style="height:15px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading"><strong>Preview changes using Mr.Dev.&#8217;s Framework</strong></h4>



<p class="">On the plugin settings on the configuration tab, you will find the <em>CSS Utilities</em> section. Check the box <strong>Utils Backend</strong>, and you are ready to go.</p>



<p class="">If you want to use utilities on breakpoints, simply select the ones you want on the same group of checkboxes.</p>



<div style="height:15px" aria-hidden="true" class="  wp-block-spacer"></div>



<h4 class="  wp-block-heading"><strong>Manually configuration of the preview</strong></h4>



<p class="">Add the below code into the functions.php file or into a custom plugin.</p>



<pre class="wp-block-code"><code>add_action( 'admin_enqueue_scripts', 'mrutils_admin_styles' );
function mrutils_admin_styles() {
    wp_enqueue_style( 'mrutils_admin', 'https://raw.githubusercontent.com/marcosrego-web/mr-utils/master/css/utils.css', false, '1.0.0' );
    wp_enqueue_style( 'mrutils_admin_backend', 'https://raw.githubusercontent.com/marcosrego-web/mr-utils/master/css/utils_backend.css', false, '1.0.0' );
}</code></pre>



<p class="">If you want to add breakpoints you need to add more &#8220;wp_enqueue_style&#8221; to the above, between the first and last one, this time also indicating the intended media query, like this:</p>



<pre class="wp-block-code"><code>wp_enqueue_style( 'mrutils_admin_phone', 'https://raw.githubusercontent.com/marcosrego-web/mr-utils/master/css/utils_phone.css', false, '1.0.0','(max-width: 768px)' );</code></pre>



<p class="">If you want to avoid external requests:</p>



<ol class="  wp-block-list"><li><a href="https://marcosrego.com/client-area/downloads/?product=mrutils">Download Mr.Utils <em>(free)</em></a> </li><li>Unzip into your website. </li><li>Replace the link on the code above, with the location where you unzipped the folder.</li></ol>



<p class=""></p>



<h2 class="wp-block-heading"><strong>How to use Mr.Utils features on the block editor</strong></h2>



<p class="">If you installed Mr.Utils as a plugin, you&#8217;ll now see the option &#8220;Utilities&#8221; when selecting a block. By using that interface you don&#8217;t need to know the methods explained below.</p>



<figure class="    wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-27 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-full"><a href="https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1.png"><img loading="lazy" decoding="async" width="772" height="250" data-id="2289" src="https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1.png" alt="Mr.Utils options on WordPress block editor" class="wp-image-2289" title="banner 772x250 1 - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1.png 772w, https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1-300x97.png 300w, https://marcosrego.com/wp-content/uploads/2021/10/banner-772x250-1-768x249.png 768w" sizes="auto, (max-width: 772px) 100vw, 772px" /></a><figcaption>Mr.Utils options on WordPress block editor</figcaption></figure>
</figure>



<p class="">If you didn&#8217;t install Mr.Utils as a plugin, most of the methods shown below, will work by adding specific classes into <strong>Advanced > Additional CSS Class(es)</strong> on any block:</p>



<figure class="    wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/09/block-editor-with-frontedn-toolkit-1024x538.png" alt="Block editor with frontend toolkit" class="wp-image-1946" title="block editor with frontedn toolkit - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/09/block-editor-with-frontedn-toolkit-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/09/block-editor-with-frontedn-toolkit-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/09/block-editor-with-frontedn-toolkit-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/09/block-editor-with-frontedn-toolkit.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="  wp-block-heading"><strong>Global font-sizes</strong></h3>



<p class="">With Mr.Utils you have <strong>7 global font-sizes</strong> and it&#8217;s <strong>possible to change</strong> their values.</p>



<p class="">For example, add the class <strong>mr-fontsize5</strong> into <strong>Advanced &gt; Additional CSS Class(es)</strong> on any block that has text and see it changing sizes.</p>



<p class="">You can also use different sizes depending of the device/breakpoint joining multiple classes, for example:<br><strong>mr-fontsize5 mr-phone-fontsize4</strong><br><strong>mr-desktop-fontsize7 mr-tablet-fontsize5 mr-phone-fontsize6</strong></p>



<p class="">If you want to change the values for the 7 sizes, you can <a href="https://github.com/marcosrego-web/mr-utils/wiki/Variables#how-to-do" target="_blank" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Variables#how-to-do" rel="noreferrer noopener"><strong>check the documentation explaining how to change variables</strong></a>. It explains how to do it manually or using the Mr.Dev.&#8217;s Framework.</p>



<h3 class="  wp-block-heading"><strong>Global colors</strong> (Mr.Dev.&#8217;s Framework)</h3>



<p class="">For this one feature, Mr.Utils is currently not enough, you&#8217;ll want to use Mr.Dev.&#8217;s Framework to define which will be the global colors that appear on the block editor.</p>



<p class="">Being a global color means that if you select a color and then decide to change the value, all blocks using it will automatically have their colors changed to the new value.</p>



<figure class="  wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-28 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="     wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="693" data-id="958" src="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_styles-1024x693.jpg" alt="Mr.Dev.&#039;s Framework - Styles" class="wp-image-958" title="mrdev framework styles - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_styles-1024x693.jpg 1024w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_styles-300x203.jpg 300w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_styles-768x520.jpg 768w, https://marcosrego.com/wp-content/uploads/2021/06/mrdev-framework_styles.jpg 1342w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption>Use the plugin settings, or optionally use the customizer and block editor, to add global colors, typography, sizes and breakpoints.</figcaption></figure>
</figure>



<h3 class="  wp-block-heading"><strong>Remove margins and paddings of blocks</strong></h3>



<p class="">Removing margins and paddings can be very useful because currently at the moment of writing, some blocks have default margins or paddings that you might not want. It&#8217;s much easier to add a class instead of changing via CSS.</p>



<p class="">With Mr.Utils you can choose the side you want to remove the margin/padding or remove on all sides. Simply add the correspondent class into <strong>Advanced &gt; Additional CSS Class(es</strong>):</p>



<figure class="wp-block-table"><table><tbody><tr><td>mr-nomargin</td><td>mr-nopadding</td></tr><tr><td>mr-nomargintop</td><td>mr-nopaddingtop</td></tr><tr><td> mr-nomarginright</td><td> mr-nopaddingright</td></tr><tr><td> mr-nomarginbottom</td><td> mr-nopaddingbottom</td></tr><tr><td> mr-nomarginleft</td><td> mr-nopaddingleft</td></tr></tbody></table></figure>



<p class="">And you can also remove the margin/padding only on specific devices/breakpoints, for example:</p>



<p class=""><strong>mr-desktop-nomargin<br>mr-phone-nopaddingright</strong></p>



<h3 class="  wp-block-heading"><strong>Add global margins and paddings</strong></h3>



<p class="">Mr.Utils brings the classes <strong>mr-margin</strong> and <strong>mr-padding</strong>, that can also point to specific sides of the block:</p>



<figure class="wp-block-table"><table><tbody><tr><td>mr-margin</td><td>mr-padding</td></tr><tr><td>mr-margintop</td><td>mr-paddingtop</td></tr><tr><td> mr-marginright</td><td> mr-paddingright</td></tr><tr><td> mr-marginbottom</td><td> mr-paddingbottom</td></tr><tr><td> mr-marginleft</td><td> mr-paddingleft</td></tr></tbody></table></figure>



<p class="">And you can also use the margin/padding only on specific devices/breakpoints, for example:</p>



<p class=""><strong>mr-desktop-margin<br>mr-phone-paddingright</strong></p>



<p class="">If you want to change the values for the global margins and paddings, you can <a href="https://github.com/marcosrego-web/mr-utils/wiki/Variables#how-to-do" data-type="URL" data-id="https://github.com/marcosrego-web/mr-utils/wiki/Variables#how-to-do" target="_blank" rel="noreferrer noopener"><strong>check the documentation explaining how to change variables</strong></a>. It explains how to do it manually <strong>or using the Mr.Dev.&#8217;s Framework</strong>.</p>



<h3 class="  wp-block-heading"><strong>Change visibility of a block depending of the device</strong></h3>



<p class="">To show or hide a block, you can use the classes <strong>mr-show</strong> and <strong>mr-hide</strong> respectively.</p>



<p class="">To point to specific devices/breakpoints, all you have to do is to add the device name between the prefix and action. Here are some examples:</p>



<figure class="  wp-block-table is-style-regular"><table><tbody><tr><td class="has-text-align-left" data-align="left">Show on phone only:</td><td><strong>mr-hide mr-phone-show</strong></td></tr><tr><td class="has-text-align-left" data-align="left">Hide on phone:</td><td><strong>mr-phone-hide</strong></td></tr><tr><td class="has-text-align-left" data-align="left">Show on portrait devices:</td><td><strong>mr-landscape-hide</strong></td></tr><tr><td class="has-text-align-left" data-align="left">Hide on desktop and laptop:</td><td><strong>mr-desktop-hide mr-laptop-hide</strong></td></tr></tbody></table></figure>



<figure class="    wp-block-image size-large"><a href="https://marcosrego.com/websites/itemzero/"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-1024x538.png" alt="Itemzero Open Graph Image" class="wp-image-1012" title="marcosrego itemzero open graph - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/04/marcosrego-itemzero-open-graph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption> The <a href="https://marcosrego.com/websites/itemzero/" data-type="post" data-id="1">Itemzero Shop</a> has some good examples of showing content depending of the device/breakpoint using <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a>. </figcaption></figure>



<h3 class="  wp-block-heading"><strong>Change how Columns blocks display on mobile</strong></h3>



<p class="">By default when you set the number of columns on the Columns block, that number will apply on desktop. On mobile the columns will be automatically stacked below each other.</p>



<p class="">But if you only have images or you don&#8217;t have a lot of text in the columns, it could look better with 2 columns on each line.</p>



<p class="">You can do that with Mr.Utils, you can add classes such as <strong>mr-phone-2perline</strong> into <strong>Advanced &gt; Additional Class(es)</strong>.</p>



<p class="">If you installed the toolkit as a plugin it&#8217;s even more friendly: Click on &#8220;Utilities&#8221;, on the phone icon and then on layout you choose 2 as the number of items per line.</p>



<p class=""></p>



<h3 class="  wp-block-heading"><strong>Change the order of blocks depending of the device</strong></h3>



<p class="">Changing the order of blocks is easy with drag and drop but if you want to change the order depending of the device/breakpoint, you&#8217;ll need something more:</p>



<ol class="  wp-block-list"><li><strong>Select all the blocks that will be reordered</strong> and then select the option &#8220;<strong>Group</strong>&#8220;.</li><li>On the <strong>Group Block</strong> go to <strong>Advanced &gt; Additional CSS Class(es)</strong> and add the class <strong>mr-1perline</strong> (You can replace 1 with any number between 0 [infinite] and 12, this would be similar to using columns).</li><li>Then select the first block you want to reorder and on <strong>Advanced &gt; Additional CSS Class(es)</strong> section, add the class <strong>mr-<em>breakpoint</em>-order</strong> followed by a number between -1 and 12 and replacing <em>breakpoint</em> with the device name (desktop, laptop, tablet, phone or another custom breakpoint that exists). Example: <strong>mr-phone-order2</strong>. Do the same for each block inside the group (Repeated numbers are allowed).</li></ol>



<p class=""></p>



<h3 class="  wp-block-heading"><strong>Horizontal scroll list of posts</strong></h3>



<p class="">Using the block &#8220;Latest Posts&#8221;, or any other block that works as a list, you can add the class <strong>mr-swipecontent</strong> or <strong>mr-horizontalscrollcontent</strong> into <strong style="color: var(--main-text-color) ; font-family: var(--text-font, &quot;Arial,Helvetica Neue,Helvetica&quot;); font-size: revert; background-color: var(--main-background-color, #dfdfd0);">Advanced &gt; Additional CSS Class(es)</strong>, to make that list flow horizontally and become scrollable when the amount of items is big.</p>



<figure class="    wp-block-image size-large"><a href="https://marcosrego.com/websites/ressanogarcia/"><img loading="lazy" decoding="async" width="1024" height="538" src="https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-1024x538.png" alt="Ressano Garcia Arquitectos Open Graph Image" class="wp-image-1813" title="ressanogarciaarquitectos marcosrego site opengraph - Mr.Utils enhances the block editor with 8 extra features" srcset="https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-1024x538.png 1024w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-300x158.png 300w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph-768x403.png 768w, https://marcosrego.com/wp-content/uploads/2021/04/ressanogarciaarquitectos-marcosrego-site-opengraph.png 1200w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>The website <strong><a href="https://marcosrego.com/websites/ressanogarcia/">Ressano Garcia Arquitectos</a></strong> is a good example of horizontal scrolling lists of posts using <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">Mr.Utils</a>.</figcaption></figure>



<div style="height:15px" aria-hidden="true" class="  wp-block-spacer"></div>



<p class=""><strong>Those are the 8 features I wanted to share with you!</strong> I&#8217;ll update this post If I add more into <a href="https://marcosrego.com/development/mr-utils/" data-type="post" data-id="473">this front-end toolkit</a>.</p>



<h2><b>Comments</b></h2>
<div id="disqus_thread"></div>
<script>
if(mrGetCookie('cookielawinfo-checkbox-functional') == 'yes') {
    var disqus_config = function () {
        this.page.url = (location.protocol+'//'+location.host+location.pathname).replace("/account/", "/");
        this.page.identifier = document.querySelector("article").id.replace("post-", "");
    };
    
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://marcosrego-web.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
} else {
    document.querySelector('#disqus_thread').innerHTML = 'You cannot view or add comments because you did not consent to the use of functional cookies: <a class="  cli_manage_current_consent" style="cursor:pointer;">Manage your consent.</a>';
}
</script>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
