<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Web on dev notes</title>
    <link>https://juhanakristianblog.netlify.app/tags/web/</link>
    <description>Recent content in Web on dev notes</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 21 Apr 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://juhanakristianblog.netlify.app/tags/web/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What are template literal types in TypeScript?</title>
      <link>https://juhanakristianblog.netlify.app/posts/what-are-template-literal-types-in-typescript/</link>
      <pubDate>Thu, 21 Apr 2022 00:00:00 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/what-are-template-literal-types-in-typescript/</guid>
      <description>&lt;p&gt;Before diving into template literal types, we first need to discuss &lt;a href=&#34;https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types&#34;&gt;string literal types&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In TypeScript, string literal types are types that constrain the type of a variable to a string or a union of strings.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;type&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Greeting&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;hello world&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;text1&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;Greeting&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;hello world&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#75715e&#34;&gt;// ✅  This is ok&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;text2&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;Greeting&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;hello&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#75715e&#34;&gt;// ❌ Type &amp;#39;&amp;#34;hello&amp;#34;&amp;#39; is not assignable to type &amp;#39;&amp;#34;hello world&amp;#34;&amp;#39;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Constraining the value of a variable to a single string is not that useful but a union of strings is something you&amp;rsquo;ll see often.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hidden gems of the Chrome DevTools, Part 2: CSS tools</title>
      <link>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-devtools-part-2/</link>
      <pubDate>Fri, 25 Jun 2021 23:59:01 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-devtools-part-2/</guid>
      <description>&lt;p&gt;In the &lt;a href=&#34;https://juhanajauhiainen.com/posts/hidden-gems-of-the-chrome-dev-tools-part-1&#34;&gt;last article on the series&lt;/a&gt; we looked into some features on the Chrome Console API. This time we&amp;rsquo;ll see some of the tools Chrome has to offer when working with CSS and layouts.&lt;/p&gt;&#xA;&lt;h2 id=&#34;inspect-layout&#34;&gt;Inspect layout&lt;/h2&gt;&#xA;&lt;p&gt;Chrome developer tools include handy tools for inspecting and debugging grid and flexbox layouts. When we open Chrome developer tools on the &lt;code&gt;Elements&lt;/code&gt; tab, you&amp;rsquo;ll find a &lt;code&gt;Layout&lt;/code&gt; tab right next to &lt;code&gt;Styles&lt;/code&gt; and &lt;code&gt;Computed&lt;/code&gt;. Under &lt;code&gt;Layout&lt;/code&gt; we will see a listing of all the grids and all the flexbox layouts on the current page.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hidden gems of the Chrome DevTools, Part 2: CSS tools</title>
      <link>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-dev-tools-part-3/</link>
      <pubDate>Mon, 21 Jun 2021 09:33:01 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-dev-tools-part-3/</guid>
      <description>&lt;h2 id=&#34;accessibility-features&#34;&gt;Accessibility features&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;accesibility tab&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;debugger&#34;&gt;debugger&lt;/h2&gt;&#xA;&lt;h2 id=&#34;experimental&#34;&gt;Experimental&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;font editor in styles&lt;/li&gt;&#xA;&lt;li&gt;CSS overview&lt;/li&gt;&#xA;&lt;li&gt;flex box debugging&lt;/li&gt;&#xA;&lt;li&gt;accessibility tree&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Create a retro text effect with CSS</title>
      <link>https://juhanakristianblog.netlify.app/posts/create-a-retro-text-effect-with-css/</link>
      <pubDate>Tue, 13 Apr 2021 09:33:01 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/create-a-retro-text-effect-with-css/</guid>
      <description>&lt;p&gt;In this article, we&amp;rsquo;re going to create an 80&amp;rsquo;s style text effect with CSS. The effect uses multiple &lt;code&gt;text-shadow&lt;/code&gt;, &lt;code&gt;background-clip&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, linear gradients and &lt;code&gt;-webkit-text-stroke&lt;/code&gt; to achieve a cool metallic effect.&lt;/p&gt;&#xA;&lt;p&gt;Before we dive into the actual CSS you probably want to see the end result.&lt;/p&gt;&#xA;&lt;iframe src=&#34;https://codesandbox.io/embed/retro-3d-text-demo-v3q3h?fontsize=14&amp;hidenavigation=1&amp;theme=dark&amp;view=preview&#34;&#xA;     style={{width:&#34;100%&#34;, height:500, border:0, borderRadius: 4, overflow:&#34;hidden&#34;}}&#xA;     title=&#34;retro-3d-text-demo&#34;&#xA;     allow=&#34;accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking&#34;&#xA;     sandbox=&#34;allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts&#34;&#xA;   &gt;&lt;/iframe&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start by defining our HTML markup that we will be using.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hidden gems of the Chrome DevTools, Part 1: The Console API</title>
      <link>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-dev-tools-part-1/</link>
      <pubDate>Sat, 03 Apr 2021 09:33:01 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/hidden-gems-of-the-chrome-dev-tools-part-1/</guid>
      <description>&lt;p&gt;Debugging, or finding the reason why your code doesn&amp;rsquo;t work, is one of the most important skills a software developer needs. If you can debug effectively, you&amp;rsquo;ll catch problems faster and even gain a better understanding of how things work under the hood.&lt;/p&gt;&#xA;&lt;p&gt;In frontend development, we have a variety of tools available to debug our code. We can use a &lt;a href=&#34;https://code.visualstudio.com/Docs/editor/debugging&#34;&gt;debugger&lt;/a&gt; to step through our code, we can log values to the browser console and we can use the &lt;a href=&#34;https://developer.chrome.com/docs/devtools/&#34;&gt;DevTools&lt;/a&gt; of our browser.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Use box-sizing: border-box for simpler element sizing</title>
      <link>https://juhanakristianblog.netlify.app/posts/css-box-model/</link>
      <pubDate>Mon, 04 Jan 2021 09:33:01 +0000</pubDate>
      <guid>https://juhanakristianblog.netlify.app/posts/css-box-model/</guid>
      <description>&lt;p&gt;The CSS property &lt;code&gt;box-sizing&lt;/code&gt; defines how the &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; properties behave on a element with border or padding. Normally, when &lt;code&gt;box-sizing&lt;/code&gt; has its defualt value of &lt;code&gt;content-box&lt;/code&gt;, width and height affect the size of the &lt;strong&gt;content&lt;/strong&gt;. This means that if you have a element with &lt;code&gt;padding: 10px&lt;/code&gt;, &lt;code&gt;border: 8px&lt;/code&gt; and &lt;code&gt;width: 100px&lt;/code&gt; then full width of the element will be &lt;code&gt;136px&lt;/code&gt;. This also affects elements which have a relative &lt;code&gt;width&lt;/code&gt; or &lt;code&gt;height&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
