<?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>web dev | Bogdan's blog</title>
	<atom:link href="https://blog.bogdancarpean.com/tag/web-dev/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.bogdancarpean.com</link>
	<description>Code and anything else.</description>
	<lastBuildDate>Sat, 24 Dec 2022 02:14:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://blog.bogdancarpean.com/wp-content/uploads/2022/12/icons8-pencil-drawing-96.png</url>
	<title>web dev | Bogdan's blog</title>
	<link>https://blog.bogdancarpean.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Simple disable mode using only CSS</title>
		<link>https://blog.bogdancarpean.com/simple-disable-mode-using-only-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-disable-mode-using-only-css</link>
					<comments>https://blog.bogdancarpean.com/simple-disable-mode-using-only-css/#respond</comments>
		
		<dc:creator><![CDATA[Bogdan]]></dc:creator>
		<pubDate>Sat, 24 Dec 2022 02:14:57 +0000</pubDate>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web dev]]></category>
		<guid isPermaLink="false">https://blog.bogdancarpean.com/?p=451</guid>

					<description><![CDATA[<p>Photo by AVI on Unsplash There is a simple way to add a visual disable state to an HTML element. We just have to add the following CSS class to the parent HTML element we want to disable: .disabled { cursor: initial; pointer-events: none; opacity: 0.5; } Caveats of this method: disabling the elements using [&#8230;]</p>
The post <a href="https://blog.bogdancarpean.com/simple-disable-mode-using-only-css/">Simple disable mode using only CSS</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></description>
										<content:encoded><![CDATA[<pre>Photo by <a href="https://unsplash.com/ja/@ravali?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">AVI</a> on <a href="https://unsplash.com/photos/_9ag8c_oOJU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></pre>
<p>There is a simple way to add a visual disable state to an HTML element.</p>
<p>We just have to add the following CSS class to the parent HTML element we want to disable:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">
.disabled {
    cursor: initial;
    pointer-events: none;
    opacity: 0.5;
}
</pre>
<p>Caveats of this method: disabling the elements using CSS only does not disable the keyboard tab focusing. At the time of writing, there is no viable CSS only solution to disable the tab navigation. For this, a tabindex=&#8221;-1&#8243; property should be used on the HTML element. To dynamically switch the tabindex we need to use JavaScript to find the element and change the value.</p>The post <a href="https://blog.bogdancarpean.com/simple-disable-mode-using-only-css/">Simple disable mode using only CSS</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://blog.bogdancarpean.com/simple-disable-mode-using-only-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
