<?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>Fix CSS Problems</title>
	<atom:link href="https://www.fix-css.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fix-css.com/</link>
	<description>CSS and Templates</description>
	<lastBuildDate>Thu, 08 May 2025 15:23:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Making Full Site Editing Block Theme for WordPress</title>
		<link>https://www.fix-css.com/2023/02/making-full-site-editing-block-theme-for-wordpress/</link>
					<comments>https://www.fix-css.com/2023/02/making-full-site-editing-block-theme-for-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Tue, 14 Feb 2023 13:34:45 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Block Themes]]></category>
		<category><![CDATA[FSE]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1676</guid>

					<description><![CDATA[<p>In 2023 we have an option to finally work with full-site editing mode and to create a unique block theme inside WordPress&#8217;s new (Beta) Editor. I&#8217;ve started to make a new block theme for a multilanguage RTL website and write [&#8230;]</p>
<p>The post <a href="https://www.fix-css.com/2023/02/making-full-site-editing-block-theme-for-wordpress/">Making Full Site Editing Block Theme for WordPress</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In 2023 we have an option to finally work with full-site editing mode and to create a unique block theme inside WordPress&#8217;s new (Beta) Editor. I&#8217;ve started to make a new block theme for a multilanguage RTL website and write down my notes below.</p>



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



<h2 class="wp-block-heading">Starting with a New Block Theme for Full Site Editing (<abbr title="Full Site Editing">FSE</abbr>)</h2>



<p>Block theme is somehow simpler to create. One can just duplicate the default WordPress <a href="https://wordpress.org/themes/twentytwentythree/" target="_blank" rel="noreferrer noopener">2023 theme</a> and change the name to your new theme, as you wish + change to your new theme name through the theme files. There is also a plugin that helps with this process called &#8220;<a href="https://wordpress.org/plugins/create-block-theme/" target="_blank" rel="noreferrer noopener">Create Block Theme</a>&#8220;. It allows automatic cloning of the active block theme (i.e. 2023 theme) with a new name. And you can embed new local fonts with this plugin too.</p>



<h2 class="wp-block-heading">Caveats</h2>



<p>Most of your settings now will reside in your <em>theme.json</em> file. In fact, the 2023 theme doesn&#8217;t have any functioning PHP files at all. So be prepared to edit this JSON file a lot. And you can&#8217;t put any comments into JSON + no random commas at the end of expressions are allowed. Or everything will fail.</p>



<h3 class="wp-block-heading">New Editor</h3>



<p>Important to know, that default theme template files will be saved into the database once you modify and save them in the editor. So i.e. after everything was set up and ready, we can write it down back to the theme files with the help of the &#8220;<a href="https://wordpress.org/plugins/create-block-theme/" target="_blank" rel="noreferrer noopener">Create Block Theme</a>&#8221; plugin again (needs to be tested yet).</p>



<h3 class="wp-block-heading">Local Fonts</h3>



<p>After you add some local fonts to your theme, they may not display correctly, because the code will look for local fonts on your computer/browser first. To avoid this rename your local font of the theme to some unique name to push the browser to use your uploaded font.</p>



<pre class="wp-block-code"><code> "typography": {
            "dropCap": false,
            "fluid": true,
            "customFontSize": true,
            "fontFamilies": &#91;{
                "fontFamily": "\"UniqueName Heebo\", sans-serif",
                "slug": "heebo",
                "name": "Heebo",
                "fontFace": &#91;{
                        "fontFamily": "UniqueName Heebo",
                        "fontWeight": "300",
                        "fontStyle": "normal",
                        "fontDisplay": "swap",
                        "src": &#91;"file:./assets/fonts/heebo_300.woff2"]
                    },
                    {
                        "fontFamily": "UniqueName Heebo",
                        "fontWeight": "400",
                        "fontStyle": "normal",
                        "fontDisplay": "swap",
                        "src": &#91;"file:./assets/fonts/heebo_regular.woff2"]
                    }
                ]
            }],</code></pre>



<h4 class="wp-block-heading">Editor Default Headings Font Not Loading in RTL Mode</h4>



<p>Because of a piece of the default RTL editor&#8217;s style by WordPress 6.2 <strong>Headings</strong> are not getting the default font family style. Can be fixed by adding it through <code>editor-style.css</code> which can be loaded into the theme from <code>functions.php</code></p>



<pre class="wp-block-code"><code>if ( ! function_exists( 'iggy_theme_support' ) ) :
	function iggy_theme_support() {
		// Enqueue editor styles.
		add_editor_style( 'css/editor-style.css' );
    }
endif;
add_action( 'after_setup_theme', 'iggy_theme_support' );</code></pre>



<p>And then in editor-style.css</p>



<pre class="wp-block-code"><code>/* Editor */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
}</code></pre>



<p>But better to resolve it from the theme.json in the styles/elements section to overwrite default RTL styles for Headings:</p>



<pre class="wp-block-code"><code>"h1": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "3.625rem",
          "lineHeight": "1.2"
          }
       },
"h2": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "clamp(2.625rem, calc(2.625rem + ((1vw - 0.48rem) * 8.4135)), 3.25rem)",
          "lineHeight": "1.2"
          }
        },
"h3": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "var(--wp--preset--font-size--x-large)"
          }
        },
"h4": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "var(--wp--preset--font-size--large)"
          }
        },
"h5": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "var(--wp--preset--font-size--medium)",
          "fontWeight": "700",
          "textTransform": "uppercase"
          }
        },
"h6": {
       "typography": {
          "fontFamily": "var(--wp--preset--font-family--heebo)",
          "fontSize": "var(--wp--preset--font-size--medium)",
          "textTransform": "uppercase"
          }
       },</code></pre>



<p>Notice added <code>"fontFamily"</code>  value.</p>



<h2 class="wp-block-heading">Functions.php and CSS files for a block theme</h2>



<p>I&#8217;ve found it impossible to make my unique theme without CSS files and functions.php additions. But these files are really small compared with a regular wp theme.</p>



<h4 class="wp-block-heading">Calling CSS Files with Version Timestamp to Avoid Caches</h4>



<pre class="wp-block-code"><code>if ( ! function_exists( 'iggy_styles' ) ) :
	function iggy_styles() {

		// Register theme stylesheet.
		wp_register_style( 'iggy-style', get_stylesheet_uri(), array(), filemtime( get_stylesheet_directory() . '/style.css' ) );

		// Enqueue theme stylesheet.
		wp_enqueue_style( 'iggy-style' );
	}

endif;
add_action( 'wp_enqueue_scripts', 'iggy_styles' );

// add version to rtl.css
add_filter( 'locale_stylesheet_uri', function ($localized_stylesheet_uri) {
    $time_ver = filemtime( get_stylesheet_directory() . '/rtl.css' );
    return add_query_arg( array('ver' =&gt; $time_ver), $localized_stylesheet_uri );
});</code></pre>



<p>I&#8217;ve found it better not to replace the regular stylesheet with the RTL stylesheet, but to add additional RTL styles after the main style.css</p>



<h4 class="wp-block-heading">Change Viewport Default Meta Tag and Add Color Theme for Mobile Browsers</h4>



<p>I like my sites to cover the whole area on the iPhone screen in Landscape mode. So have to replace the viewport meta tag.</p>



<pre class="wp-block-code"><code>add_action('wp_head', function() {
	remove_action('wp_head', '_block_template_viewport_meta_tag', 0);
    echo '&lt;meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, viewport-fit=cover"&gt;';
    echo '&lt;meta name="theme-color" content="#050E2A"&gt;';
}, PHP_INT_MIN);</code></pre>



<h2 class="wp-block-heading">WPML Compatibility</h2>



<h3 class="wp-block-heading">Header and Footer Editing</h3>



<p>At the time of writing (version 4.5.14 of WPML Multilingual CMS plugin) WPML wasn&#8217;t compatible with FSE mode. You can&#8217;t translate the header and footer directly in the new FSE editor. Translating the header and footer in another language from the editor won&#8217;t have any effect yet.</p>



<p>Create a header and footer <strong>in your default language</strong>, resave the template into the database<strong>, </strong>and go to WPML → Translation Management. Then <a href="https://wpml.org/documentation/getting-started-guide/translating-content-created-using-gutenberg-editor/translating-sites-that-use-full-site-editing/" target="_blank" rel="noreferrer noopener">WPML recommends</a> choosing the Template or Template Parts post type from the dropdown menu and selecting the templates. In the WPML new editor, it translated only texts without an option to translate links. </p>



<p>I&#8217;ve had better results when switched to WPML <strong>Classic Edfitor</strong> and allowed templates and template parts to be translated in WPML Settings. Then gone to Translation Management, sent the needed translations, like Menus, Header, and Footer to the Translations Queue, and translated the whole header block, footer + all menus. Beware, the editor opens in visual mode, switch to text to see the HTML, copy, and finish the translation job. Also &#8220;translate&#8221; Image IDs for the logo etc, if they&#8217;re different for different languages.</p>



<p>You also should create menus in additional language versions to be able to translate them via Strings Translation or better from the Translations Queue. Beware that not finished translation jobs from the Queue won&#8217;t show in the menus, even while fully translated via the String Translation.</p>



<h4 class="wp-block-heading">Update 13/11/23</h4>



<p>I can now edit menus directly in the Editor navigation editing even per language. That&#8217;s great! Other parts of template parts are still only editable per the default language and will need a translation through WPML. </p>



<h3 class="wp-block-heading">Images in Template Parts</h3>



<p>Images can be translated from Media Translation under the WPML menu. This is useful if not using some SVG code or image ID. Just upload another image as a translation. It&#8217;s replacing the untranslated image and also updating image size and ALT text.</p>



<h3 class="wp-block-heading">Language Switcher</h3>



<p>For now, there is no dedicated language switcher block available, so you have to use a shortcode block to install a language switcher as a shortcode. I.e.:</p>



<pre class="wp-block-code"><code>&#91;wpml_language_switcher flags=0 native=1 translated=0]&#91;/wpml_language_switcher]</code></pre>



<h4 class="wp-block-heading">Update 28/5/23</h4>



<p>WPML already has a language switcher block for FSE with many options. But it needs a translation, as other header/footer parts, just duplicate the default language code. Cheers!</p>



<h4 class="wp-block-heading">Update 8/5/25</h4>



<p>Header and footer template parts are no longer editable from strings translation. I need to edit them in a newer WPML editor. But it&#8217;s not working well, it&#8217;s often duplicating header and footer template parts and leaves them unattached to custom templates for another language. Watch out for duplicated templates, menus, patterns and parts in the editor. I copied them to the default ones, and then they show as needed. Additional items I delete. <a href="https://wpml.org/errata/template-is-not-applied-to-translated-page/" target="_blank" rel="noreferrer noopener">This case</a> solution helped me to overcome the issue. This is crazy <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2 class="wp-block-heading">Woocommerce Compatibility</h2>



<p>Woocommerce already has some blocks available, so there are no problems discovered by me yet.</p>
<p>The post <a href="https://www.fix-css.com/2023/02/making-full-site-editing-block-theme-for-wordpress/">Making Full Site Editing Block Theme for WordPress</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2023/02/making-full-site-editing-block-theme-for-wordpress/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Popup Maker Plugin: Make Popup Stick to Screen&#8217;s Bottom in Safari</title>
		<link>https://www.fix-css.com/2022/08/popup-maker-plugin-make-popup-stick-to-screens-bottom-in-safari/</link>
					<comments>https://www.fix-css.com/2022/08/popup-maker-plugin-make-popup-stick-to-screens-bottom-in-safari/#comments</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Fri, 26 Aug 2022 01:04:35 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[popupmaker]]></category>
		<category><![CDATA[Safari]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1660</guid>

					<description><![CDATA[<p>Popup Maker is a great and very popular plugin for WordPress. Very useful, i.e. to create a GDPR notification easily. Typically you&#8217;ll set up a cookie, attach a popup to the bottom of the screen, choose a fixed position and [&#8230;]</p>
<p>The post <a href="https://www.fix-css.com/2022/08/popup-maker-plugin-make-popup-stick-to-screens-bottom-in-safari/">Popup Maker Plugin: Make Popup Stick to Screen&#8217;s Bottom in Safari</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a href="https://wordpress.org/plugins/popup-maker/" target="_blank" rel="noreferrer noopener nofollow">Popup Maker</a> is a great and very popular plugin for WordPress. Very useful, i.e. to create a GDPR notification easily.  Typically you&#8217;ll set up a cookie, attach a popup to the bottom of the screen, choose a fixed position and disable the overlay, and it will work.  </p>



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



<p>But then testing on iPhone&#8217;s Safari, where we have floating bars, you&#8217;ll see that the popup is not following the bottom line smoothly. It&#8217;s &#8220;jumping&#8221; with ugly delays.</p>



<h2 class="wp-block-heading">Stick to Bottom Fix for Safari</h2>



<p>I&#8217;ve investigated this issue for a long time. Plugin&#8217;s authors are explaining that the bottom position of a popup is always counted from the top. So it&#8217;s creating this problem on Mobile Safari.</p>



<p>Here&#8217;re my settings for the popup:</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="823" height="405" src="https://www.fix-css.com/csig/wp-content/uploads/2022/08/image.png" alt="Advanced display settings" class="wp-image-1661" srcset="https://www.fix-css.com/csig/wp-content/uploads/2022/08/image.png 823w, https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-300x148.png 300w, https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-768x378.png 768w" sizes="(max-width: 823px) 100vw, 823px" /><figcaption>Overlay disabled. Repositioning is disabled too to stop JS continuous counts from the top.</figcaption></figure>



<p>Here&#8217;s my code to make it smooth for a theme used.</p>



<pre class="wp-block-code"><code>.pum-theme-gdpr.pum-overlay.pum-overlay-disabled {
    position: static;
}
.pum-theme-gdpr .pum-container {
    top: auto !important;
    bottom: 0 !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: fixed !important;
    transform: translate3d(0, 0, 0) !important;
    transform-style: preserve-3d;
    transition: none !important;
}</code></pre>



<p><code>.pum-theme-gdpr</code> is my theme class, you can replace it with your theme class.</p>



<p>I&#8217;m switching the overlay container to a static position. Otherwise, its default fixed position will influence <code>.pum-container</code> inside.</p>



<h3 class="wp-block-heading">Accessibility Tip</h3>



<p>When the overlay is disabled, disable accessibility settings too, because by default Popup Maker will add <code>aria-hidden="true"</code> to the site content, that is an error, because without overlay site&#8217;s content still usable and it will create an accessibility error in the Lighthouse accessibility check.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="778" height="278" src="https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-1.png" alt="Advanced accessibility features disabled" class="wp-image-1662" srcset="https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-1.png 778w, https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-1-300x107.png 300w, https://www.fix-css.com/csig/wp-content/uploads/2022/08/image-1-768x274.png 768w" sizes="(max-width: 778px) 100vw, 778px" /></figure>
<p>The post <a href="https://www.fix-css.com/2022/08/popup-maker-plugin-make-popup-stick-to-screens-bottom-in-safari/">Popup Maker Plugin: Make Popup Stick to Screen&#8217;s Bottom in Safari</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2022/08/popup-maker-plugin-make-popup-stick-to-screens-bottom-in-safari/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Get Blog Template Content Visible in WordPress</title>
		<link>https://www.fix-css.com/2022/08/get-blog-template-content-visible-in-wordpress/</link>
					<comments>https://www.fix-css.com/2022/08/get-blog-template-content-visible-in-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Sun, 14 Aug 2022 13:41:11 +0000</pubDate>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1653</guid>

					<description><![CDATA[<p>By default the content you add to a designated Blog page in WordPress won&#8217;t be visible on the front-end. The template called home.php will overwrite any content you input to the editor on that page. This could be changed by [&#8230;]</p>
<p>The post <a href="https://www.fix-css.com/2022/08/get-blog-template-content-visible-in-wordpress/">Get Blog Template Content Visible in WordPress</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>By default the content you add to a designated Blog page in WordPress won&#8217;t be visible on the front-end. The template called home.php will overwrite any content you input to the editor on that page. This could be changed by adding the following PHP code to this template, where needed.</p>



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



<pre class="wp-block-code"><code>&lt;?php 
// Display the content of the static Blog Page.
   $post = get_queried_object();
   setup_postdata( $post );
   the_content();
   wp_reset_postdata();
?&gt;</code></pre>



<p>Outputs editor&#8217;s content to the front-end. This is needed many times when we&#8217;ll need to insert some text or other blocks before the loop.</p>
<p>The post <a href="https://www.fix-css.com/2022/08/get-blog-template-content-visible-in-wordpress/">Get Blog Template Content Visible in WordPress</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2022/08/get-blog-template-content-visible-in-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Simple Form Labels Animation with CSS</title>
		<link>https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/</link>
					<comments>https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Sat, 24 Apr 2021 14:14:40 +0000</pubDate>
				<category><![CDATA[CSS CheatSheets]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[HubSpot]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1622</guid>

					<description><![CDATA[<p>Animate form labels easily, just with few lines of CSS.<a class="more-link" href="https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/">Simple Form Labels Animation with CSS</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve struggled to animate form labels and placeholders. Previous solutions didn&#8217;t work, because I wasn&#8217;t able to change the label&#8217;s position inside HTML. Previous solutions I&#8217;ve seen are all required labels or another element to be put below the input field. But I was adding CSS to <a href="https://knowledge.hubspot.com/forms/create-forms" target="_blank" rel="noreferrer noopener nofollow">HubSpot forms</a>, where we can&#8217;t change their HTML.</p>



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



<p>Then I saw new available <code><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within" target="_blank" rel="noreferrer noopener">:focus-within</a></code> pseudo-class, that is actually can select a parent element, the option that never before existed in CSS. So here&#8217;s my code, I&#8217;m using both placeholders and labels to show the labels as a tip.</p>



<p>Since we&#8217;ll be using <code>absolute</code> position, we need to make input surrounded element <code>position: relative</code>.</p>



<pre class="wp-block-code"><code>.hs-form-field {
	position: relative;
}</code></pre>



<p>Then manipulate the label, show it only on focus with animation:</p>



<pre class="wp-block-code"><code>/* label animation */
.hs-form-field > label {
    position: absolute;
    top: 0;
    opacity: 0;
    transition: 180ms ease-out 200ms;
}
.hs-form-field:focus-within > label {
    opacity: 1;
    top: -1rem;
    transition: 200ms ease-in;
}</code></pre>



<p>The result can be something like below, the label is hidden, and then animates to the top. Make sure you leave enough space for that and for error messages between your form rows. This way you can have both placeholder and label, and they can be different, useful to provide additional tips to fill in the form.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://www.fix-css.com/csig/wp-content/uploads/2021/04/labels-animation.png"><img decoding="async" width="842" height="429" src="https://www.fix-css.com/csig/wp-content/uploads/2021/04/labels-animation.png" alt="Form Labels Animation" class="wp-image-1623" srcset="https://www.fix-css.com/csig/wp-content/uploads/2021/04/labels-animation.png 842w, https://www.fix-css.com/csig/wp-content/uploads/2021/04/labels-animation-300x153.png 300w, https://www.fix-css.com/csig/wp-content/uploads/2021/04/labels-animation-768x391.png 768w" sizes="(max-width: 842px) 100vw, 842px" /></a></figure></div>
<p>The post <a href="https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/">Simple Form Labels Animation with CSS</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2021/04/simple-form-labels-animation-with-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Updating to WordPress 5.6 for Blocks Based Theme Fix</title>
		<link>https://www.fix-css.com/2020/12/updating-to-wordpress-5-6-for-blocks-based-theme-fix/</link>
					<comments>https://www.fix-css.com/2020/12/updating-to-wordpress-5-6-for-blocks-based-theme-fix/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Sat, 12 Dec 2020 14:16:21 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 5.6]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1614</guid>

					<description><![CDATA[<p>I have a block-based theme using Gutenberg editor. After updating to WordPress 5.6 the editor window with a collection of full width blocks was pushing the sidebar out of editor page margins. I&#8217;ve noticed the class .interface-interface-skeleton__editor is getting too [&#8230;]</p>
<p>The post <a href="https://www.fix-css.com/2020/12/updating-to-wordpress-5-6-for-blocks-based-theme-fix/">Updating to WordPress 5.6 for Blocks Based Theme Fix</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I have a block-based theme using Gutenberg editor. After updating to WordPress 5.6 the editor window with a collection of full width blocks was pushing the sidebar out of editor page margins.</p>



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



<p>I&#8217;ve noticed the class <code>.interface-interface-skeleton__editor</code> is getting too wide on admin screen. I guess wide and full-width blocks are pushing it.</p>



<p>Adding max-width: 100%; is fixing the problem.</p>



<p>Since I use ACF Pro anyway, I&#8217;m adding this to<code> functions.php</code> of the theme:</p>



<pre class="wp-block-code"><code>// add some styles to ACF
add_action( 'acf/input/admin_footer', 'add_to_acf_styles' );
function add_to_acf_styles() { ?>
    &lt;style>
        .interface-interface-skeleton__editor {
            max-width: 100%;
        }
    &lt;/style>
    &lt;?php
}
</code></pre>



<p>It&#8217;s fixing the editor overflow of wide blocks.</p>



<p><a href="https://github.com/WordPress/gutenberg/issues/27622" target="_blank" rel="noreferrer noopener nofollow">Here you may read more</a> on the issue.</p>



<p> </p>
<p>The post <a href="https://www.fix-css.com/2020/12/updating-to-wordpress-5-6-for-blocks-based-theme-fix/">Updating to WordPress 5.6 for Blocks Based Theme Fix</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2020/12/updating-to-wordpress-5-6-for-blocks-based-theme-fix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Disable WordPress 5.5 Lazy Loading Image when Using wp_get_attachment_image()</title>
		<link>https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/</link>
					<comments>https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Tue, 18 Aug 2020 10:16:03 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ACF]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[lazy loading]]></category>
		<category><![CDATA[wordpress 5.5]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1603</guid>

					<description><![CDATA[<p>Stop lazy loading in WordPress 5.5 for a specific image added via wp_get_attachment_image<a class="more-link" href="https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/">Disable WordPress 5.5 Lazy Loading Image when Using wp_get_attachment_image()</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>WordPress 5.5 now has lazy loading for images enabled by default. Tried many things to disable it for specific images, but only this worked. I&#8217;ve seen many places recommending to use <em>array(&#8216;loading&#8217; =&gt; false)</em> but it didn&#8217;t work.</p>



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



<p><em>&#8216;loading&#8217; =&gt; eager</em> worked instead. It goes like this, when I use <a href="https://www.advancedcustomfields.com/" target="_blank" rel="noreferrer noopener nofollow">ACF Pro</a> loaded image with ID option:</p>



<pre class="wp-block-code"><code>&lt;?php
$tab_image = get_sub_field( 'tab_image' );
$size = 'medium';
$loading = &#91;'loading' => 'eager'];

if ( $tab_image ) {
echo wp_get_attachment_image( $tab_image, $size, false, $loading );
}
?></code></pre>



<p>It&#8217;s important to add <em>false </em>before <em>$loading</em>, or it&#8217;ll not work either.</p>



<p>Also possible to write it directly:</p>



<pre class="wp-block-code"><code>echo wp_get_attachment_image( $front_image, $size, false, &#91;
'class' => 'some-class some-other-class', 
'loading' => 'eager'
] );</code></pre>



<p>Now it&#8217;s stopping lazy loading for <em>wp_get_attachment_image</em>.</p>



<p>As mentioned <a href="https://make.wordpress.org/core/2020/01/29/lazy-loading-images-in-wordpress-core/" target="_blank" rel="noreferrer noopener nofollow">here</a>.</p>
<p>The post <a href="https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/">Disable WordPress 5.5 Lazy Loading Image when Using wp_get_attachment_image()</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2020/08/disable-wordpress-5-5-lazy-loading-image-when-using-wp_get_attachment_image/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Transition Animation of CSS Gradient for background-clip: text</title>
		<link>https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/</link>
					<comments>https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Sat, 25 Jul 2020 09:35:04 +0000</pubDate>
				<category><![CDATA[CSS CheatSheets]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1599</guid>

					<description><![CDATA[<p>Animate background-clip text with CSS background on hover. Smooth.<a class="more-link" href="https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/">Transition Animation of CSS Gradient for background-clip: text</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Smooth animation for CSS gradient clipped to text. As we all know, we can&#8217;t animate backgrounds with transition. So I&#8217;m moving gradients to make a perfect animation with <code>transition</code> on <code>hover</code>, without creating separate animation frames.</p>



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



<p>Here I needed to animate from solid color to gradient.</p>



<p>First I&#8217;m making <code>background-size: 400% 400%</code>, and then can easily create linear-gradients with initial color and hover color together.  Like so:</p>



<pre class="wp-block-code"><code>.nav-menu a {
  color: #3c3d42;
  background-color: #3c3d42;
  background: linear-gradient(80deg, #ff2453 0%, #a21da6 25%, #3c3d42 75%) no-repeat 100% 100%;
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: 300ms ease-in-out 5ms;
}
.nav-menu a:hover, .nav-menu a:active, .nav-menu .current-menu-item a {
  background: linear-gradient(90deg, #ff2453 0%, #a21da6 25%, #3c3d42 75%) no-repeat 100% 0%;
  background-position: 0 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 400% 400%
}</code></pre>



<p>You can play more with gradient angle etc. Works great.</p>
<p>The post <a href="https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/">Transition Animation of CSS Gradient for background-clip: text</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2020/07/transition-animation-of-css-gradient-for-background-clip-text/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WP Bakery Page Builder and WPML Manual Translation Settings</title>
		<link>https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/</link>
					<comments>https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/#respond</comments>
		
		<dc:creator><![CDATA[Iggy Pritzker]]></dc:creator>
		<pubDate>Sun, 14 Jun 2020 00:12:28 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[Page Builder]]></category>
		<category><![CDATA[translations]]></category>
		<category><![CDATA[Visual Composer]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WPML]]></category>
		<guid isPermaLink="false">https://www.fix-css.com/?p=1588</guid>

					<description><![CDATA[<p>WPML manual translations editing settings for WPBakery Page Builder<a class="more-link" href="https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/">WP Bakery Page Builder and WPML Manual Translation Settings</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you have several languages enabled and you want to use manual translation of independently designed pages (<a rel="sponsored noopener noreferrer" href="https://wpml.org/?aid=190371&amp;affiliate_key=rxKr7VfSzkuq&amp;dr=settings-article" target="_blank">WPML</a>&#8216;s Classic Translation Editor), you need to enable <code>_wpb_shortcodes_custom_css</code> <strong>TRANSLATE </strong>in <em>Settings &gt; Custom Fields Translation</em>!</p>



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



<div class="wp-block-image"><figure class="aligncenter size-large"><a href="https://www.fix-css.com/csig/wp-content/uploads/2020/06/wpml-settings.png"><img loading="lazy" decoding="async" width="919" height="385" src="https://www.fix-css.com/csig/wp-content/uploads/2020/06/wpml-settings.png" alt="" class="wp-image-1589" srcset="https://www.fix-css.com/csig/wp-content/uploads/2020/06/wpml-settings.png 919w, https://www.fix-css.com/csig/wp-content/uploads/2020/06/wpml-settings-300x126.png 300w, https://www.fix-css.com/csig/wp-content/uploads/2020/06/wpml-settings-768x322.png 768w" sizes="auto, (max-width: 919px) 100vw, 919px" /></a></figure></div>



<p>Otherwise, Visual Composer inline CSS will not show when the translated page is published. It will still show on Preview Page. Weird, but true.</p>



<p>I.e. For Hebrew you may need to change alignment and padding of elements. It breaks the page if Page Builder&#8217;s inline CSS translation is not enabled <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2 class="wp-block-heading">Bonus: Custom XML Configuration</h2>



<p>Some, not fully checked yet, WPML &#8220;Custom XML Configuration&#8221; settings for Yoast SEO and WP Bakery Page Builder. Includes translations of Raw HTML widget + Yoast Breadcrumbs configuration for WPML.</p>



<pre class="wp-block-code"><code>&lt;wpml-config>
    &lt;shortcodes>
        &lt;shortcode>
            &lt;tag encoding="base64">vc_raw_html&lt;/tag>
        &lt;/shortcode>
    &lt;/shortcodes>
    &lt;custom-fields>
        &lt;custom-field action="translate">_yoast_wpseo_title&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_bctitle&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_metadesc&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_metakeywords&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_focuskw&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_focuskeywords&lt;/custom-field>
        &lt;custom-field action="copy">_yoast_wpseo_meta-robots-noindex&lt;/custom-field>
        &lt;custom-field action="copy">_yoast_wpseo_meta-robots-nofollow&lt;/custom-field>
        &lt;custom-field action="copy">_yoast_wpseo_meta-robots-adv&lt;/custom-field>
        &lt;custom-field action="ignore">_yoast_wpseo_canonical&lt;/custom-field>
        &lt;custom-field action="ignore">_yoast_wpseo_redirect&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_opengraph-description&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_google-plus-description&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_twitter-title&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_twitter-description&lt;/custom-field>
        &lt;custom-field action="translate">_yoast_wpseo_opengraph-title&lt;/custom-field>
        &lt;custom-field action="copy-once">_yoast_wpseo_opengraph-image&lt;/custom-field>
        &lt;custom-field action="copy-once">_yoast_wpseo_twitter-image&lt;/custom-field>
    &lt;/custom-fields>
    &lt;custom-fields-texts>
        &lt;key name="_yoast_wpseo_focuskeywords">
            &lt;key name="*">
                &lt;key name="keyword"/>&lt;/key>
        &lt;/key>
    &lt;/custom-fields-texts>
    &lt;admin-texts>
        &lt;key name="wpseo_titles">
            &lt;key name="title-*"/>
            &lt;key name="metadesc-*"/>
            &lt;key name="metakey-*"/>
            &lt;key name="company_name"/>
            &lt;key name="breadcrumbs-sep"/>
            &lt;key name="breadcrumbs-home"/>
            &lt;key name="breadcrumbs-prefix"/>
            &lt;key name="breadcrumbs-archiveprefix"/>
            &lt;key name="breadcrumbs-searchprefix"/>
            &lt;key name="breadcrumbs-404crumb"/>&lt;/key>
        &lt;key name="wpseo_rss">
            &lt;key name="rssbefore"/>
            &lt;key name="rssafter"/>&lt;/key>
        &lt;key name="wpseo_social">
            &lt;key name="og_default_image"/>
            &lt;key name="og_frontpage_title"/>
            &lt;key name="og_frontpage_desc"/>
            &lt;key name="og_frontpage_image"/>&lt;/key>
    &lt;/admin-texts>
&lt;/wpml-config></code></pre>



<p>May not be needed, but may help to some versions of plugin.</p>
<p>The post <a href="https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/">WP Bakery Page Builder and WPML Manual Translation Settings</a> appeared first on <a href="https://www.fix-css.com">Fix CSS Problems</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.fix-css.com/2020/06/wp-bakery-page-builder-and-wpml-manual-translation-settings/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
