<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Akshay Sharma</title>
    <description>The latest articles on Forem by Akshay Sharma (@akshaykumar6).</description>
    <link>https://forem.com/akshaykumar6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F109104%2F43583bcc-de5f-4735-b80b-8c7f735c4214.jpeg</url>
      <title>Forem: Akshay Sharma</title>
      <link>https://forem.com/akshaykumar6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/akshaykumar6"/>
    <language>en</language>
    <item>
      <title>Building High-Performance Infinite Lists in React</title>
      <dc:creator>Akshay Sharma</dc:creator>
      <pubDate>Tue, 04 Jun 2019 03:55:38 +0000</pubDate>
      <link>https://forem.com/akshaykumar6/building-high-performance-infinite-lists-in-react-31k7</link>
      <guid>https://forem.com/akshaykumar6/building-high-performance-infinite-lists-in-react-31k7</guid>
      <description>&lt;p&gt;Internet is filled with products using infinite scrolling. Infinite scroll makes the consumption of information very easy and highly addictive. Products with timelines or feeds like Twitter, Instagram, etc. are best suited for infinite scrolls.&lt;/p&gt;

&lt;p&gt;Implementing the infinite scrolling in JavaScript can be challenging. Especially, when your feed has thousands of items, the problem gets more complex. Let's look at some of the problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problems
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Slow rendering as the browser has to repaint all the elements in case of resizing&lt;/li&gt;
&lt;li&gt;Laggy scrolling &lt;/li&gt;
&lt;li&gt;Finally, thousands of DOM elements on your page can crash the browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most devices refresh their screens &lt;strong&gt;60 times a second&lt;/strong&gt;. Each of those frames has a budget of just over 16ms (1 second / 60 = 16.66ms). When you fail to meet this budget the frame rate drops, and the content shakes on screen. You can check the refresh rate for your webpage using FPS meter available in Chrome. FPS is definitely going to be lower than 60 when you scroll on a page with so many DOM elements.&lt;/p&gt;

&lt;h3&gt;
  
  
  What can we do?
&lt;/h3&gt;

&lt;p&gt;We'll have to reduce the elements and handle the scroll issues. These are some basic ideas to resolve these issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOM Recycling&lt;/strong&gt;: The idea is to render only the visible elements. We can reuse them to render the new items rather than creating new ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scroll Anchoring&lt;/strong&gt;: As there will be only 10 elements in DOM, we need to fake the scroll to give the illusion of infinite scroll.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These require a lot of calculations and corner conditions to be managed to implement it efficiently. While reading about the problems I came across &lt;a href="https://github.com/bvaughn/react-virtualized"&gt;react-virtualized&lt;/a&gt; package which has built solutions for all these and was recommended by &lt;a href="https://twitter.com/dan_abramov/status/716369503291105283"&gt;Dan Abramov&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does react-virtualized work?
&lt;/h3&gt;

&lt;p&gt;React virtualized implements virtual rendering with a set of components that does the same thing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They calculate which items are visible inside the area where the list is displayed.&lt;/li&gt;
&lt;li&gt;They use a container with relative position and absolute position the children elements inside of it by changing its width, height, top and left properties.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We are going to use the following components to render a list with dynamic width and items of dynamic width and height:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List&lt;/strong&gt;: This component renders a list of elements. It takes care of virtualizing the list and rendering only visible items.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CellMeasurer&lt;/strong&gt;: It automatically measures a cell's contents by temporarily rendering it in a way that is not visible to the user. Specify a fixed width to measure the dynamic height (or vice versa).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CellMeasurerCache&lt;/strong&gt;: It stores &lt;code&gt;CellMeasurer&lt;/code&gt; measurements and shares them with the parent (&lt;code&gt;List&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AutoSizer&lt;/strong&gt;: It is a high-order component that automatically adjusts the width and height of a single child.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;InfiniteLoader&lt;/strong&gt;: It manages just-in-time fetching of data as a user scrolls up or down in a list. It also caches the list data to avoid fetching it again while the user is scrolling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's use them to build a real list.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;You can go through the &lt;strong&gt;&lt;a href="https://github.com/bvaughn/react-virtualized/tree/master/docs#documentation"&gt;docs&lt;/a&gt;&lt;/strong&gt; to understand the working of these components and the meaning of the different props available.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching Issues
&lt;/h3&gt;

&lt;p&gt;If you are re-rendering the list based on some state changes, you might face issues because of the caching done by &lt;code&gt;CellMeasurerCache&lt;/code&gt; and &lt;code&gt;InfiniteLoader&lt;/code&gt;. The cache can be cleared using in-built methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Reset cached measurements for all cells.&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cellMeasurerCache&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;clearAll&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Reset any cached data about already-loaded rows&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;infiniteLoaderRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resetLoadMoreRowsCache&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope this helped you in understanding the problems with implementing large lists and how to deal with them. It provides a basic understanding of react-virtualized package. The package provides lots of other components to solve problems of large and dynamic tables, grids, etc. &lt;a href="https://github.com/bvaughn"&gt;Brian Vaughn&lt;/a&gt; also recommends &lt;a href="https://github.com/bvaughn/react-window"&gt;react-window&lt;/a&gt; as a possible light-weight alternative.&lt;/p&gt;

&lt;p&gt;Share your use cases and issues you have faced with infinite lists in the comments. Thanks!&lt;/p&gt;

</description>
      <category>react</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Progressive Web Apps: Custom Splash Screen</title>
      <dc:creator>Akshay Sharma</dc:creator>
      <pubDate>Mon, 22 Oct 2018 17:12:34 +0000</pubDate>
      <link>https://forem.com/akshaykumar6/progressive-web-apps-custom-splash-screen-ce7</link>
      <guid>https://forem.com/akshaykumar6/progressive-web-apps-custom-splash-screen-ce7</guid>
      <description>&lt;p&gt;The splash screen appears instantly when your app starts up. If your app is heavy, it might take a few seconds to load the app depending on the device's configurations. By default, both Android and iOS show a plain white screen as the splash screen for web apps. It is always better to customize the splash screen to provide a complete app experience.&lt;/p&gt;

&lt;p&gt;In order to change the splash screen of your progressive web app, you must use the configure few properties for your app to provide complete native look and feel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Android
&lt;/h3&gt;

&lt;p&gt;Chrome for Android automatically shows your custom splash screen as long as you meet the following requirements in your web app manifest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;name&lt;/code&gt; property is set to the name of your PWA.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;background_color&lt;/code&gt; property is set to a valid CSS colour value.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;icons&lt;/code&gt; array specifies an icon that has 512px by 512px size icon.&lt;/li&gt;
&lt;li&gt;The icon exists and is a PNG.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It will also show the app name below the icon using the &lt;code&gt;name&lt;/code&gt; property. The text colour cannot be customized. It is contrast based &lt;a href="https://github.com/w3c/manifest/issues/642#issuecomment-360777137" rel="noopener noreferrer"&gt;according to this post&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  iOS
&lt;/h3&gt;

&lt;p&gt;iOS does not support a similar method of automatically generating a splash screen. Instead, you need to provide splash screens tailored for each iOS device using the &lt;code&gt;apple-touch-startup-image&lt;/code&gt; HTML meta tag. We can use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-media" rel="noopener noreferrer"&gt;media&lt;/a&gt; attribute and media queries to load device specific images.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/iphone5_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/iphone6_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/iphoneplus_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/iphonex_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/ipad_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/ipadpro1_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"apple-touch-startup-image"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"assets/splashscreens/ipadpro2_splash.png"&lt;/span&gt; &lt;span class="na"&gt;media=&lt;/span&gt;&lt;span class="s"&gt;"(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can generate images for all the resolutions using this &lt;a href="https://appsco.pe/developer/splash-screens" rel="noopener noreferrer"&gt;tool&lt;/a&gt; by Appsco. They also have an option where you can use only your logo and a background colour to generate these images.&lt;/p&gt;

&lt;p&gt;Keep your app's splash screen updated with the different sizes of iOS devices available &lt;a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen#static-launch-screen-images" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Live Demo
&lt;/h3&gt;

&lt;p&gt;Open the app and click on "Add to Home Screen" - &lt;a href="https://headlines-pwa.firebaseapp.com" rel="noopener noreferrer"&gt;Headlines App&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F19OPpMK.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F19OPpMK.gif" width="1024" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/tools/lighthouse/audits/custom-splash-screen" rel="noopener noreferrer"&gt;Android: Custom Splash Screen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW6" rel="noopener noreferrer"&gt;Safari: Specifying a Launch Screen Image&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>progressivewebapp</category>
      <category>pwa</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Progressive Web Apps: Configure Status Bar</title>
      <dc:creator>Akshay Sharma</dc:creator>
      <pubDate>Sun, 21 Oct 2018 10:21:15 +0000</pubDate>
      <link>https://forem.com/akshaykumar6/progressive-web-apps-configure-status-bar-16fa</link>
      <guid>https://forem.com/akshaykumar6/progressive-web-apps-configure-status-bar-16fa</guid>
      <description>&lt;p&gt;Progressive Web Apps (PWA) are starting to pick up a lot of momentum and are getting adopted by major tech companies including Uber, Twitter, Instagram and many others. While developing my first PWA, supporting cross-platform custom status bar proved to be a bigger challenge than expected. This is a quick post to help others quickly customize PWA status bar that works across both Android and iOS devices, including devices with the notch.&lt;/p&gt;

&lt;p&gt;In order to change the status bar at the top of the screen (which usually displays the time and battery status) of your progressive web app, you must use the configure few properties for your app to provide complete native look and feel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Android
&lt;/h3&gt;

&lt;p&gt;Chrome, Firefox and Opera allow you to define the colour of the status bar using the meta tags.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Chrome, Firefox OS and Opera --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"theme-color"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"#014473"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNsUIohY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FNsUIohY.png" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  iOS
&lt;/h3&gt;

&lt;p&gt;Unfortunately, the number of ways to customize the status bar for iOS devices are fairly limited, but Apple offers the &lt;code&gt;apple-mobile-web-app-status-bar-style&lt;/code&gt; meta tag to customize status bar. There are three distinct settings available: &lt;code&gt;default&lt;/code&gt;, &lt;code&gt;black&lt;/code&gt;, and &lt;code&gt;black-translucent&lt;/code&gt;. The default value is &lt;code&gt;default&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This meta tag has no effect unless you add &lt;code&gt;apple-apple-mobile-web-app-capable&lt;/code&gt; meta tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"apple-mobile-web-app-capable"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"yes"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Default
&lt;/h4&gt;

&lt;p&gt;The default setting has a white background with black text and symbols.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"apple-mobile-web-app-status-bar-style"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"default"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBS17zf4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBS17zf4.jpg" width="750" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Black
&lt;/h4&gt;

&lt;p&gt;The black setting has a black background and black text and symbols, making it appear completely black.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"apple-mobile-web-app-status-bar-style"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"black"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkPf8MUi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FkPf8MUi.jpg" width="750" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Black-translucent
&lt;/h4&gt;

&lt;p&gt;The black-translucent setting has white text and symbols. It will take the same background colour as the body of your web app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"apple-mobile-web-app-status-bar-style"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"black-translucent"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#014473&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FXIrafYW.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FXIrafYW.jpg" width="750" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Live Demo
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://headlines-pwa.firebaseapp.com?ref=devto" rel="noopener noreferrer"&gt;Headlines App&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  References:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android" rel="noopener noreferrer"&gt;Android Support&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW4" rel="noopener noreferrer"&gt;Safari HTML Reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW1" rel="noopener noreferrer"&gt;Safari Web Content Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/akshaykumar6/headlines-pwa" rel="noopener noreferrer"&gt;Demo App - Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>progressivewebapp</category>
      <category>pwa</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
