<?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 sam acuña on Medium]]></title>
        <description><![CDATA[Stories by sam acuña on Medium]]></description>
        <link>https://medium.com/@samueleishion?source=rss-723aa77beccd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tMGoQ7IoqfKFk744r-9x1g.png</url>
            <title>Stories by sam acuña on Medium</title>
            <link>https://medium.com/@samueleishion?source=rss-723aa77beccd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 00:11:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samueleishion/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[Moving away from moving gradients]]></title>
            <link>https://medium.com/@samueleishion/moving-away-from-moving-gradients-9928bf542a21?source=rss-723aa77beccd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9928bf542a21</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[svg]]></category>
            <dc:creator><![CDATA[sam acuña]]></dc:creator>
            <pubDate>Thu, 19 Jan 2017 22:27:31 GMT</pubDate>
            <atom:updated>2017-01-19T22:27:31.122Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the weekend I came about a couple of gradient animations that caught my attention and reminded me of my portfolio site design from 2014. I found these examples on Urban Outfitter’s logo and on Instagram’s web-app “Sign Up” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*yal5VztmPQIyjoRpmJDg8g.gif" /><figcaption>Urban Outfiters moving gradient logo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*mI6-EbrUV9RWyPnHs51zcA.gif" /><figcaption>Instagram moving gradient button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*SkCRmzQvKdS8M2tTkQ0mHw.gif" /><figcaption>Old homepage (2014) moving gradient (x4)</figcaption></figure><p>As you can see, they bare a resemblance not only in the fact that they are animated/moving gradients, but even the colors are very similar.</p><p>Most of these colors were actually the most popular around <a href="https://www.pantone.com/color-of-the-year-2013">2013</a>, <a href="https://www.pantone.com/color-of-the-year-2014">2014</a> and <a href="https://www.pantone.com/color-of-the-year-2015">2015</a>. And that’s partially why I am moving away from those colors and design for 2017.</p><p>While we are here, I think it should be pretty interesting to compare and contrast these 3 examples of moving gradients and see how they are composed and built.</p><h3>Urban Outfitters</h3><p>Their logo is actually a <strong>gif</strong>, which works, but it’s not the most challenging from a front-end developer’s perspective.</p><p><em>What is a front-end developer</em>, you may ask? A front-end developer is a programmer that focuses on the visual layer of a website or an app.</p><p>When we inspect the code on the Urban outfitter’s homepage, you’ll see that they are using a gif as a background image to that anchor (a tag).</p><p><em>How do we inspect the code</em>, you may ask? On any website, when you right-click on the page, you should see a menu coming up. Select “Inspect” or “Inspect Element” and it should open what we call the “developer console.” This console will give you all sorts of information, from the HTML code, styles associated with those elements, files/assets loaded for that page, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9UG3_dm8j6RMYAxCnSek6g.png" /></figure><p>Again, using a gif for the logo gets the job done, but the quality of the image is lower due to its compression. To be fair, <a href="https://en.wikipedia.org/wiki/GIF#Usage">gif images can be compressed without losing quality</a>, but you can see on this image how the edges are not the sharpest. Lo-fi gifs work when you are doing memes, but I, personally, would not recommend compressing a company logo that much for an animated gradient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*UnE_KAFymAcg7SlLZT4MgA.gif" /><figcaption>Actual gif they are using: <a href="http://www.urbanoutfitters.com/urban/images/UOLogo_Holiday16.gif">http://www.urbanoutfitters.com/urban/images/UOLogo_Holiday16.gif</a></figcaption></figure><h3>Instagram</h3><p>This is actually a more challenging and creative approach to animating the gradient, since it uses only <strong>HTML</strong> and <strong>CSS</strong> to do the trick (no images). This approach doesn’t loose as much quality either, and you can tell by the sharpness of the button’s text and the smoother animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*kM19La2o9gif0TfDJQ6RXg.gif" /><figcaption>Rotating gradient highlighted.</figcaption></figure><p>The way they actually coded it is by having two divs within a button. One that contains the text “Sign up” with higher z-index, and another one containing the CSS gradient. This last div also has a CSS animation to rotate infinitely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SP29Jhk6If9qskKfgKijjA.png" /></figure><p>That highlighted div has two classes: ._h7ogh for the radial-gradient, and ._97a8v for the GradientRotation animation.</p><p>I personally favor this approach more over using a gif, but this technique is not really changing the colors in the gradient. Rather, the rotation only makes it seem to change the colors. So, how did I do it on my old portfolio site?</p><h3>My (old) Portfolio Site</h3><p>I focused on using an <strong>SVG</strong> rectangle with a gradient and using <strong>Javascript</strong> to change the color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRH17E9Gxei48AjABWG1Iw.png" /><figcaption>Actual colors I am using in my (old) portfolio site.</figcaption></figure><p>The concept is that I randomly pick 2 colors from the pool of colors to begin: one for the top left corner, and the other for the bottom right corner.</p><p>Then I randomly pick 2 more colors. These are going to be the colors we will be moving towards. Then I start an interval so that each 100ms, we make the calculation to get to the new colors. The process is pretty simple. Each color is stored in its rgb value, say for instance rgb(63,172,163) and rgb(175,77,51). For the calculation we look at the first red value: 63. Then we compare it to the second red value: 175. Since 63 is less than 175, we add 1 to it and we store it. Then we do the same for the blue and green pairs until the colors match (they are both rgb(175,77,51)). At that point we pick another “target” color, and we move the current color towards it.</p><p>Something I learned while developing this is the use of gradients via SVGs. For that you just need to define a &lt;defs&gt; tag with a &lt;linearGradient&gt; tag with a given <em>id</em>. Then you use that <em>id</em> to refer to it in the fill property for the rectangle.</p><p><a href="https://gist.github.com/samueleishion/e7c21c753901448fcbcf1cc2914004ee">Here’s a gist</a> with the specific code for this.</p><p>Here’s also<a href="http://2014.samuelacuna.com/"> a demo</a>.</p><p>It is important to notice, that the fill for the rectangle has to include the full url for the site in order to be viewed in Firefox. At least, that was the case back in 2014.</p><p>I actually built this portfolio site to land the gig at my current job. I was really confident and my interviews were going great. One of my interviewers, the Director of the UX Research &amp; Analyst team, came into the meeting room seemingly distracted. He asked me a few questions, but he kept looking at his computer. He then paused, he turned his laptop to face me, and asked me “what is this?”</p><p>I looked at his monitor and it looked like a simple white screen. Then I realized that it was a maximized browser, Firefox, with my portfolio site’s domain name on the address bar. Fully loaded. It had crashed. I responded: “You got me.” That gradient worked on every other browser except for his newer-than-mine version of Firefox. The issue was that I had not included the full domain name in the fill css property.</p><p>That same night I figured out what the issue was, <a href="https://github.com/samueleishion/samuelacuna/commit/50b8046a284f9d9ca9a2be60ac1ec212e8abf054#diff-f039e0fd80448fe38e43be1a0842780aR33">I pushed the change</a>, and emailed him letting him know that I had fixed it. That, in part, helped me land the job.</p><p>Now that trends have changed and that I have grown as a designer and developer is time to redesign how I present myself to the world on the interwebs. I’m definitely ready to move away from moving gradients.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9928bf542a21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fundamentals of HTML]]></title>
            <link>https://medium.com/@samueleishion/fundamentals-of-html-f187b6a93d23?source=rss-723aa77beccd------2</link>
            <guid isPermaLink="false">https://medium.com/p/f187b6a93d23</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[user-research]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[sam acuña]]></dc:creator>
            <pubDate>Sun, 20 Nov 2016 00:34:52 GMT</pubDate>
            <atom:updated>2016-11-20T00:34:52.708Z</atom:updated>
            <content:encoded><![CDATA[<p>Whether you are a developer getting introduced to HTML, a Product Manager, or Market Researcher using tools like <a href="http://perspectiveux.com/">Perspective</a>, this article will introduce two basic HTML concepts to help you become more familiar with it: <em>Elements</em> and <em>Attributes</em>.</p><h3>Elements</h3><p>An HTML element is any defined item on any given page. For example, these are all HTML elements:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*i57UY6_cSCcYH0nLdscc9A.png" /><figcaption>Different HTML elements in Etsy’s home page.</figcaption></figure><h4>Tags</h4><p>From a coder’s perspective, a tag is the actual written markup for any given HTML element. For instance, here’s a paragraph tag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L6RqdkkrPThtc99g_bmzeA.png" /></figure><p>There are many default HTML tags to use. Here’s an <a href="http://www.w3schools.com/tags/">official W3C list</a>.</p><h3>Attributes</h3><p>An <a href="http://www.w3schools.com/html/html_attributes.asp">attribute</a> is exactly what it sounds like, but applied to an HTML tag: a keyword that adds specific properties to the HTML elements.</p><p>Different elements might take certain specific attributes. For instance, an image needs an <em>src</em> (source) attribute to specify the location of the image. An anchor tag (a link) needs an <em>href</em> attribute to specify its destination, and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFapG-E9x8p3Ry9XqpAMCA.png" /></figure><p>There are also <a href="http://www.w3schools.com/tags/ref_standardattributes.asp">global attributes</a> that apply to every tag. Two of them are <em>class</em> and <em>id</em>.</p><h4>Classes</h4><p>The <a href="http://www.w3schools.com/tags/att_global_class.asp">class attribute</a> is meant to group together different types of elements, even if they have the same tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ssCkFFZuANs8_tIxoCv3fA.png" /><figcaption>Both links are navigation links, but only one of them is active.</figcaption></figure><p>Any tag can have many classes, all passed in within the same class attribute. These are referenced by CSS via a dot (“.”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k54MNIxqADQo6dQCKO_XQg.png" /><figcaption>These are CSS3 selectors to “pick out” the elements with matching classes.</figcaption></figure><h4>Ids</h4><p>The <a href="http://www.w3schools.com/tags/att_global_id.asp">id attribute</a> is a unique value that any element can receive. This attribute is great to individually pick out elements even when they have the same class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uq9sIR8Ym7yUnZCenogNAA.png" /><figcaption>All links are navigation links, but each has different id to specify their purpose.</figcaption></figure><p>Not every tag needs an id (it is optional), but if it is given an id it must be a unique id for it to be valid. These are referenced by CSS via a pound sign, number sign, or a hashtag (“#”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H38Z-1TTaGCXqh4PaYAuKw.png" /><figcaption>CSS3 selectors to specifically pick out any element with matching id.</figcaption></figure><h4>Using multiple attributes</h4><p>Multiple attributes can be “stringed” together to be as specific as we want by using tag names, classes, and/or ids. These are examples of valid selectors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHMhYwYUJn9WpAPcS_zF5g.png" /><figcaption>Only picks out links (a tag) with specified class and id.</figcaption></figure><p>Using these selectors will allow you to add styles via CSS, add events and interactions with Javascript, or track that interaction with tools like <a href="http://perspectiveux.com/">Perspective</a>. Perspective is a tool that helps you collect user feedback on your site based on user interaction. The feedback collection is contextual, so you can ask questions to your users based on how they use your site. You do not need any HTML knowledge to use this tool, but understanding these selectors will help you become an advanced user of the tool.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f187b6a93d23" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>