<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ruslan Nigmatulin on Medium]]></title>
        <description><![CDATA[Stories by Ruslan Nigmatulin on Medium]]></description>
        <link>https://medium.com/@ruslannigmatulin?source=rss-91efee6e5e3c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*-R3BrNmPTHq1VPOfS2GZYw.png</url>
            <title>Stories by Ruslan Nigmatulin on Medium</title>
            <link>https://medium.com/@ruslannigmatulin?source=rss-91efee6e5e3c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:09:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ruslannigmatulin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Centimeter precision on the road]]></title>
            <link>https://medium.com/starline-oscar/centimeter-precision-on-the-road-61a78c6f6858?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/61a78c6f6858</guid>
            <category><![CDATA[gnss]]></category>
            <category><![CDATA[autonomous-cars]]></category>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[gps-tracking-system]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Mon, 03 Jun 2019 14:26:10 GMT</pubDate>
            <atom:updated>2019-06-03T14:26:10.571Z</atom:updated>
            <content:encoded><![CDATA[<p>Navigation and localization with <a href="https://en.wikipedia.org/wiki/Satellite_navigation">GNSS</a> is deeply embedded in our daily lives, and is particularly crucial to <a href="https://smartcar.starline.ru/">OSCAR</a>. While most of the people have the simplest GPS receivers within their phones, OSCAR utilizes the state-of-art GNSS technologies. But let’s talk for a while about how GNSS works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*zxTB-YfwYteqIc33OilMEg.gif" /></figure><h3>What is GNSS?</h3><p><strong>GNSS</strong> stands for <em>Global Navigation Satellite System</em>, and is the standard generic term for satellite navigation systems that provide autonomous geo-spatial positioning with global coverage. As of 2019, there are different satellite <a href="https://en.wikipedia.org/wiki/Satellite_navigation#Comparison_of_systems">constellations</a>:</p><ul><li><strong>GPS</strong> (Unites States), 31 satellites</li><li><strong>GLONASS</strong> (Russia), 24 satellites</li><li><strong>BeiDou</strong> (China), 23 satellites</li><li><strong>Galileo</strong> (European Union), 26 satellites</li><li><strong>NAVIC</strong> (India), 7 satellites</li><li><strong>QZSS</strong> (Japan), 4 satellites</li></ul><h3>How it works?</h3><p>Let’s take GPS for example. There are always at least 4 GPS satellites in line of sight to a receiver on the earth. Each of these GPS satellites sends information about its position and the current time to the GPS receiver at fixed regular instants of time. This information is transmitted to the receiver in the form of signal which is then intercepted by the receiver devices. These signals are radio signals that travel with the speed of light. The distance between a GPS receiver and the satellite is calculated by finding the difference between the time the signal was sent from GPS satellite and the time the GPS receiver received the signal.</p><p>Once the receiver receives the signal from at least three satellites, the receiver then points its location using <a href="https://en.wikipedia.org/wiki/True_range_multilateration">trilateration</a> process. A GPS requires at least 3 satellites to calculate 2-D position(latitude and longitude on a map). In this case, the GPS receiver assumes that it is located at mean sea level. However, it requires at least 4 satellites to find receivers 3-D position(latitude, longitude, and altitude).</p><h3>Why GNSS location is inaccurate in urban environments</h3><p>While GPS works well under clear skies, its location estimates can be wildly inaccurate (with a margin of error of 50 meters or more) when we need it the most: in densely populated and highly built-up urban areas, where many of our users are located.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*xodN77bp3mp4VpiNTHo4vQ.jpeg" /><figcaption>GNSS signal reflection causes accuracy degradation. Credits: Uber</figcaption></figure><p>Buildings often block the lines of sight to satellites, so the receiver frequently processes signals corresponding to strong reflections off of other buildings. The significant inaccuracy (positive offsets) in pseudoranges resulting from this phenomenon can lead to errors in position estimates that can be 50 meters or more in urban canyons. Most of us experienced these problems when ordered Uber/Yandex taxi.</p><p>To overcome this challenge, we use advanced GNSS-receivers which substantially improves location accuracy in urban environments via IMU, CAN bus information, RTK-corrections and other things.</p><h3>Advanced solutions</h3><p>There are multiple ways to precision improvements. Let’s take a quick look on the most popular:</p><ul><li><strong>IMU</strong> (Inertial Measurement Unit) is an integrated sensor package that combines multiple accelerometers and gyros to produce a three-dimensional measurement. The IMU by itself does not provide any kind of navigation solution (position, velocity, attitude), but it provide useful information for location calculation in case of GPS signal disappearance (e.g. tunnels, parking lots).</li><li><strong>RTK-corrections</strong> are provided by RTK receivers which take in an RTCM correction stream (from ground base stations) and then calculates your location with 1–2cm accuracy in real time</li><li><strong>CAN bus</strong> information is also useful for navigation solution improvement, as car can provide valuable data like speed, wheel tick information, etc.</li></ul><h3>OSCAR and high-precision GNSS-hardware</h3><p>Centimetre precision required for any autonomous vehicle, not just OSCAR. Imagine for a second, that self-driving car uses regular GPS receiver proving +/- 50 metres precision:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ypLZ4QdhWts41hlg2z_wrw.jpeg" /></figure><p>Such deviations would cause traffic accident for sure. That’s why during the development of OSCAR we’ve made some researches and tested multiple GNSS receivers and have done dozens of test rides in different urban conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSLCwXJ7W1QH06ZKY10EgQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qJLgoQbSqV-MccQC8yVoQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QQ6jUE4r83kJfm2M2t3Qyw.png" /><figcaption>One car, multiple GPS-tracks</figcaption></figure><p>In the end, we stuck with a couple of receivers:</p><ul><li><strong>NovAtel PwrPak 7D-E1</strong></li><li><strong>uBlox F9K</strong></li></ul><p>Both of them demonstrated brilliant accuracy for our needs and later were successfully integrated with our autonomous software stack.</p><p>At <strong>ScPA StarLine</strong>, we are excited about making self-driving cars a reality. If you share that feeling, check out our <a href="https://spb.hh.ru/vacancy/29669155">careers page</a>. Join our team!</p><p><strong>Twitter</strong>: <a href="https://twitter.com/starline_oscar">https://twitter.com/starline_oscar</a></p><p><strong>Website</strong>: <a href="https://smartcar.starline.ru/">https://smartcar.starline.ru</a></p><p><strong>GitLab</strong>: <a href="https://gitlab.com/starline/oscar">https://gitlab.com/starline/oscar</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61a78c6f6858" width="1" height="1" alt=""><hr><p><a href="https://medium.com/starline-oscar/centimeter-precision-on-the-road-61a78c6f6858">Centimeter precision on the road</a> was originally published in <a href="https://medium.com/starline-oscar">OSCAR</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iToggle — Pure CSS checkbox toggle]]></title>
            <link>https://medium.com/@ruslannigmatulin/itoggle-pure-css-checkbox-toggle-80cd3e17ce28?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/80cd3e17ce28</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[ui]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 12:41:17 GMT</pubDate>
            <atom:updated>2018-08-01T12:41:17.454Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes regular browser checkboxes are too boring. At these moments you can easily make them fancy just with few css classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/101/1*_Hr78hPNDOyOxMayrP7JMQ.png" /><figcaption>iOS-styled checkboxes with pure CSS</figcaption></figure><p>You can try the <a href="https://jsfiddle.net/avadon/ta2xobzc/4/">demo</a> or copy CSS code:</p><pre>.<strong>itoggle </strong>{<br>  <strong>max-height</strong>:0;<br>  <strong>max-width</strong>:0;<br>  <strong>opacity</strong>:0;<br>  <strong>position</strong>:<strong>absolute</strong>;<br>}</pre><pre><strong>input</strong>.<strong>itoggle </strong>+ <strong>label </strong>{<br>  <strong>display</strong>:<strong>block</strong>;<br>  <strong>position</strong>:<strong>relative</strong>;<br>  <strong>box-shadow</strong>:<strong>inset </strong>0 0 0 1<strong>px #d5d5d5</strong>;<br>  <strong>height</strong>:30<strong>px</strong>;<br>  <strong>width</strong>:50<strong>px</strong>;<br>  <strong>border-radius</strong>:15<strong>px</strong>;<br>  <strong>margin-bottom</strong>:0;<br>}</pre><pre><strong>input</strong>.<strong>itoggle </strong>+ <strong>label</strong>:<strong>before </strong>{<br>  <strong>content</strong>: <strong>&quot;&quot;</strong>;<br>  <strong>position</strong>: <strong>absolute</strong>;<br>  <strong>display</strong>: <strong>block</strong>;<br>  <strong>height</strong>: 30<strong>px</strong>;<br>  <strong>width</strong>: 30<strong>px</strong>;<br>  <strong>top</strong>: 0;<br>  <strong>left</strong>: 0;<br>  <strong>border-radius</strong>: 15<strong>px</strong>;<br>  <strong>background</strong>: <strong>rgba</strong>(19,191,17,0);<br>  <strong>transition</strong>: .25<strong>s ease-in-out</strong>;<br>}</pre><pre><strong>input</strong>.<strong>itoggle </strong>+ <strong>label</strong>:<strong>after </strong>{<br>  <strong>content</strong>: <strong>&quot;&quot;</strong>;<br>  <strong>position</strong>: <strong>absolute</strong>;<br>  <strong>display</strong>: <strong>block</strong>;<br>  <strong>height</strong>: 30<strong>px</strong>;<br>  <strong>width</strong>: 30<strong>px</strong>;<br>  <strong>top</strong>: 0;<br>  <strong>left</strong>: 0;<br>  <strong>border-radius</strong>: 15<strong>px</strong>;<br>  <strong>background</strong>: <strong>white</strong>;<br>  <strong>box-shadow</strong>: <strong>inset </strong>0 0 0 1<strong>px rgba</strong>(0,0,0,.2), 0 2<strong>px </strong>4<strong>px rgba</strong>(0,0,0,.2);<br>  <strong>transition</strong>: .25<strong>s ease-in-out</strong>;<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>:<strong>checked </strong>+ <strong>label</strong>:<strong>before </strong>{<br>  <strong>width</strong>: 50<strong>px</strong>;<br>  <strong>background</strong>: <strong>rgba</strong>(19,191,17,1);<br>  <strong>content</strong>:<strong>&quot;&quot;</strong>;<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>:<strong>checked </strong>+ <strong>label</strong>:<strong>after </strong>{<br>  <strong>left</strong>: 20<strong>px</strong>;<br>  <strong>box-shadow</strong>: <strong>inset </strong>0 0 0 1<strong>px rgba</strong>(19,191,17,1), 0 2<strong>px </strong>4<strong>px rgba</strong>(0,0,0,.2);<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>:<strong>disabled </strong>+ <strong>label </strong>{<br>  <strong>opacity</strong>:.5<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>.<strong>blue</strong>:<strong>checked</strong>+<strong>label</strong>:<strong>before </strong>{<br>  <strong>background</strong>:<strong>rgb</strong>(65, 183, 241);<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>.<strong>blue</strong>:<strong>checked</strong>+<strong>label</strong>:<strong>after </strong>{<br>  <strong>box-shadow</strong>: <strong>inset </strong>0 0 0 1<strong>px rgb</strong>(65,183,241), 0 2<strong>px </strong>4<strong>px rgba</strong>(65,183,241,.2);<br>}<br><br><strong>input</strong>.<strong>itoggle</strong>.<strong>red</strong>:<strong>checked</strong>+<strong>label</strong>:<strong>before </strong>{<br>  <strong>background</strong>:<strong>#c9302c</strong>;<br>}</pre><pre><strong>input</strong>.<strong>itoggle</strong>.<strong>red</strong>:<strong>checked</strong>+<strong>label</strong>:<strong>after </strong>{<br>  <strong>box-shadow</strong>: <strong>inset </strong>0 0 0 1<strong>px rgb</strong>(201,48,44), 0 2<strong>px </strong>4<strong>px rgba</strong>(201,48,44,.2);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80cd3e17ce28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sequences with CSS]]></title>
            <link>https://medium.com/@ruslannigmatulin/sequences-with-css-14078e8cd47b?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/14078e8cd47b</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[fleet-management-software]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css3]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Thu, 07 Jun 2018 15:02:44 GMT</pubDate>
            <atom:updated>2018-06-07T15:03:24.356Z</atom:updated>
            <content:encoded><![CDATA[<p>While working on our <a href="https://slon.vip/">fleet management system</a> I stuck with product redesign task. Imagine that you have a list of addresses with some ready design:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*2clw_aYCus_bTIsdR_WLNw.png" /><figcaption>Some simple design</figcaption></figure><p>and your goal is to make something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*hVimjZ5O4EvXRluu-JigiA.png" /></figure><p><strong>without modifying markup or writing additional JS</strong>. So how to make these “A”, “B”, … “N” markers just with CSS? The answer is <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters">CSS counters</a>. This feature allows you to generate pseudo elements with number/letter sequences:</p><blockquote>ul {<br> counter-reset: listStyle;<br>}</blockquote><blockquote>ul li {<br> margin-left: 1em;<br> counter-increment: listStyle;<br>}</blockquote><blockquote>ul li::before {<br> margin-right: 1em;<br> content: counter(listStyle, lower-alpha);<br>}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14078e8cd47b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between [var, let, const] in a few words]]></title>
            <link>https://medium.com/@ruslannigmatulin/difference-between-var-let-const-in-a-few-words-d1bca209d533?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1bca209d533</guid>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Fri, 27 Apr 2018 20:05:18 GMT</pubDate>
            <atom:updated>2018-04-27T20:05:18.642Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>var declarations are globally/function scoped while letand const are block scoped (visible only inside of function/block of code)</li><li>var variables can be updated and re-declared within its scope. letvariables can be updated but not re-declared; const variables can neither be updated nor re-declared.</li><li>They are all hoisted to the top of their scope but while varvariables are initialized with undefined, let and const variables are not initialized.</li><li>var and let can be declared without being initialized, const<strong>must</strong> be initialized.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1bca209d533" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new in V8? [I/O 2017]]]></title>
            <link>https://medium.com/@ruslannigmatulin/whats-new-in-v8-i-o-2017-8ce0e114abd6?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ce0e114abd6</guid>
            <category><![CDATA[es2015]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[google-io-2017]]></category>
            <category><![CDATA[v8]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Sat, 20 May 2017 09:49:47 GMT</pubDate>
            <atom:updated>2017-05-20T09:49:47.604Z</atom:updated>
            <content:encoded><![CDATA[<p>This is just a short version of Seth’s Thompson keynote “<a href="https://www.youtube.com/watch?v=EdFDJANJJLs">V8, Advanced JavaScript, &amp; the Next Performance Frontier (Google I/O ‘17)</a>”.</p><p>As you may know (or may not know) Chrome browser has an engine called V8 which compiles your JS code into native machine code through the JIT (just-in-time compilation). It generates faster machine code, but you pay the price of longer initial delay (initialization of your JS-code).</p><p>So the more V8 code optimizations, the more V8 memory consumption.</p><p>Back in 2015 V8 engine looked this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CVWyKzju-NjKxykJ089Gvw.png" /></figure><p>In 2016 Google added WebAssembly (former ASM.js).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sTeoX-cKplDQStoqDEANjg.png" /></figure><p>This year Google optimized V8 again and we have a new, simplified execution pipeline, which basically consist of Ignition and TurboFan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mP-dbDJbMcd_7MiHo35k6g.png" /></figure><p>The first one, Ignition, is an interpreter, which compile your JS code into bytecode and saves memory on all platforms (not just low-memory mobile devices).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aq5MHVNuSRL34d86Z58MEg.png" /></figure><p>The second one isTurbofan, is an optimizing compiler, which fully supports ES2015+.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6PA3dnbEh3rmKUqqRjY4w.png" /></figure><p>So basically Ignition compiles you JS-code into bytecode and sends it to TurboFan for optimization. In the end you get your fully optimized bytecode for execution.</p><p>But there is also another part (which is not presented on the chart) called Orinoco.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUMCWe92BZvOh3iIc_uOpw.png" /></figure><p>Orinoco is a parallell and concurrent garbage collector (previous GC was not always parallell, that’s why Orinoco is faster than previous one).</p><p>So what benefits we get from this new V8? Well, obviously speed performance increase. Accoding to the tests with <a href="http://browserbench.org/Speedometer/">Speedometer </a>(benchmark tool) the increase is reaching 35%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSsqFWIngylc9NdIsVSCZQ.png" /></figure><p>But let’s talk a little bit about ES2015+ features.</p><p>Originally, when feature from ES2015 were implemented in V8 they were a lot slower than transpiled versions (ES5 code). Hopefully with new V8 it’s all in the past and many of ES2015+ features are as fast as transpiled versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2ajqu4pTpxvZDY4Q8gBrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fi4dO1SRX8J4Zgx0dA5HhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29alMerUDTbWnM3xyc2oPQ.png" /></figure><p>There are also good news for Node.js fans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*861Os5l-aZ1I1pTMdevfsg.png" /></figure><p>Debugging Node-apps also became much easier:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1whs7hNxWQq64jpaSlEPQ.png" /></figure><p>But the most important feature for me was the Coverage. This feature shows you the amount of unused code and even marks unused code blocks (available in Chrome Canary).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxACj5uw-rwi4GdyGdSeHQ.png" /></figure><p>Finally, a few anouncements about WebAssembly. Not browser support is much better:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Pk1dTbodHhms4GtWH3Dvg.png" /></figure><p>In the neareset feature performance of WebAssembly code will be increased, multithreading will be added and it will be possible to use it with ES2015 features like Response object.</p><p>Overall, there are less and less reasons not use ES2015 native code, because now it’s almost fast as transpiled code. And new, even faster version of V8, allows you to give the best web experience to your lovely users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ce0e114abd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pure CSS animated placeholders]]></title>
            <link>https://medium.com/@ruslannigmatulin/pure-css-animated-placeholders-7e8dcd58668d?source=rss-91efee6e5e3c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e8dcd58668d</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Ruslan Nigmatulin]]></dc:creator>
            <pubDate>Mon, 07 Dec 2015 08:22:50 GMT</pubDate>
            <atom:updated>2015-12-08T07:17:15.765Z</atom:updated>
            <content:encoded><![CDATA[<p>Demo is <a href="https://jsfiddle.net/na9t9001/6/">here</a></p><p>In HTML5 there is a thing called <a href="http://www.w3schools.com/tags/att_input_placeholder.asp">placeholders</a>. It’s very useful when you want to give a hint to user. But there is a small problem with default placeholders in browsers: when they’re filled you can’t understand what each field means. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*G5TYHp5FEjxIKDDl8SnKeg.png" /><figcaption>This s a default form</figcaption></figure><p>And when you done filling it becomes to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*JlUUtlIzygJUZ1o4RNsCbg.png" /><figcaption>Ohh, I just forgot where is my bank account number</figcaption></figure><p>You may know that there is a simple default solution — adding label to each input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*xLcpIU8u4mE0yaBYVekabQ.png" /><figcaption>Form fields with labels</figcaption></figure><p>But what if you don’t want that amount of text for just a simple form? One of the solutions is to visually combine input label with placeholders (without a single line of Javascript). Here is a simple <a href="https://jsfiddle.net/na9t9001/6/">demo</a>.</p><p>It looks like default form but there is no any placeholder attribute. It was replaced by label with custom style and animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*ib8qxxeW074szCOEbVet8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*EPhroPVPM3yYbF78ahPUUg.png" /><figcaption>Two versions — empty and filled</figcaption></figure><p>The deal is simple — label (with red border) is placed in front of input (with green border). Then user hits input label is getting smaller and goes up to prevent input blocking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*WUKI-hNqzf-smkPKplgKgw.png" /><figcaption>Markup explanation</figcaption></figure><p>Basic markup is here:</p><blockquote>&lt;form&gt; &lt;fieldset&gt; &lt;input name=”firstName” type=”text” class=”form-control”&gt; &lt;label for=”firstName”&gt;First name&lt;/label&gt; &lt;/fieldset&gt;<br>&lt;/form&gt;</blockquote><p>And CSS for it:</p><blockquote>form fieldset {border:none;position:relative;}</blockquote><blockquote>form fieldset input {<br>padding:25px 12px 6px 12px !important;<br>height:45px !important;<br>border:none !important;<br>box-shadow:none !important;<br>border-bottom:solid 1px #dedede !important;<br>}</blockquote><blockquote>form fieldset label {<br>position: absolute;<br>top: 13px;<br>left: 13px;<br>color: #909090;<br>font-weight:300;<br>transform: translate3d(0, 0, 0);<br>transition: all 0.2s ease-in-out;<br>}</blockquote><blockquote>form fieldset input:focus + label { color: #51A2DA; font-weight: 700; font-size: 12px; transform: translate3d(0, -10px, 0);<br>}</blockquote><p>That’s all for today, I hope you liked it. In your free time you can think about this: our form could be better with color validation (:valid and :invalid).</p><p>Demo on js fiddle: <a href="https://jsfiddle.net/na9t9001/6/">https://jsfiddle.net/na9t9001/6/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e8dcd58668d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>