aboutsummaryrefslogtreecommitdiff
path: root/build/hamburger-menu-alternative/index.html
diff options
context:
space:
mode:
authorbt <bt@btxx.org>2024-06-08 13:22:19 -0400
committerbt <bt@btxx.org>2024-06-08 13:22:19 -0400
commitdcfb172704f3afb68a30425029ec834be2883274 (patch)
tree02ac480745db802d7af03f3213a0c568322170e3 /build/hamburger-menu-alternative/index.html
parente146f8a64c793c337999ce316b16ebe5fe6f2dab (diff)
More content porting, on-going markdown changes for lowdown support
Diffstat (limited to 'build/hamburger-menu-alternative/index.html')
-rw-r--r--build/hamburger-menu-alternative/index.html112
1 files changed, 71 insertions, 41 deletions
diff --git a/build/hamburger-menu-alternative/index.html b/build/hamburger-menu-alternative/index.html
index 1643de1..87f3414 100644
--- a/build/hamburger-menu-alternative/index.html
+++ b/build/hamburger-menu-alternative/index.html
@@ -1,64 +1,84 @@
<!doctype html>
-<html lang="en" id="top">
+<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:,">
<title>Using Hamburger Menus? Try Sausage Links</title>
- <link href="https://bt.ht/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
- <style>*{box-sizing:border-box;}body{font-family:sans-serif;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{overflow:auto;}table{text-align:left;width:100%;}</style>
+ <link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts" />
+ <link href="/rss.xml" type="application/rss+xml" rel="alternate" title="RSS feed for blog posts" />
+<style>*{box-sizing:border-box;}body{font-family:sans-serif;line-height:1.33;margin:0 auto;max-width:650px;padding:1rem;}img{max-width:100%;}pre{border:1px solid;overflow:auto;padding:5px;}table{text-align:left;width:100%;}.footnotes{font-size:90%;}</style>
</head>
<nav>
- <a href="#menu">Menu &darr;</a>
+ <a href="#menu">Menu &darr;</a>
</nav>
<main>
-<h1>Using Hamburger Menus? Try Sausage Links</h1>
+<h1 id="using-hamburger-menus-try-sausage-links">Using Hamburger Menus? Try Sausage Links</h1>
+
<p>2019-06-14</p>
-<p>When designing medium to large sized menu navigations on the mobile web the default go-to, for some time now, has been hamburger menus. This isn't necessarily a <i>bad</i> thing, but there is a simpler alternative for certain use cases.</p>
-<p>Before we get into the nitty-gritty details (and a simple demo) of the <em>sausage link</em> concept, let's take a quick look at the pros and cons of hamburger menus.</p>
-<h2>Hamburger Menus</h2>
-<p>The concept of the <a href="https://codepen.io/search/pens?q=hamburger%20menu&amp;page=1&amp;order=popularity&amp;depth=everything">hamburger menu</a> isn't <em>horrible</em> by any means, in fact it does solve a lot of problems from a visual perspective. Unfortunately, that doesn't mean it exists without some annoying flaws.</p>
-<h3>The Good</h3>
+
+<p>When designing medium to large sized menu navigations on the mobile web the default go-to, for some time now, has been hamburger menus. This isn&#8217;t necessarily a bad thing, but there is a simpler alternative for certain use cases.</p>
+
+<p>Before we get into the nitty-gritty details (and a simple demo) of the <em>sausage link</em> concept, let&#8217;s take a quick look at the pros and cons of hamburger menus.</p>
+
+<h2 id="hamburger-menus">Hamburger Menus</h2>
+
+<p>The concept of the <a href="https://codepen.io/search/pens?q=hamburger%20menu&amp;page=1&amp;order=popularity&amp;depth=everything">hamburger menu</a> isn&#8217;t <em>horrible</em> by any means, in fact it does solve a lot of problems from a visual perspective. Unfortunately, that doesn&#8217;t mean it exists without some annoying flaws.</p>
+
+<h3 id="the-good">The Good</h3>
+
<ul>
<li>Minimizes the amount visual space the menu requires</li>
-<li>Fairly commonplace now that a good portion of users understand it's functionality</li>
+<li>Fairly commonplace now that a good portion of users understand it&#8217;s functionality</li>
<li>Makes the lives of designers easier by tucking all items away on mobile 😛</li>
</ul>
-<h3>The Bad</h3>
+
+<h3 id="the-bad">The Bad</h3>
+
<ul>
-<li>Requires extra testing/work to ensure the menu will play nice with screen readers and keyboard-only users</li>
+<li>Requires extra testing&#47;work to ensure the menu will play nice with screen readers and keyboard-only users</li>
<li>Can get overly complex with the presence of children dropdown elements, help text etc.</li>
<li>Adds bloat to projects that might require additional JavaScript to render these menus (CSS only hamburger menus avoid this issue)</li>
<li>Adds an additional point of interaction from the user (click to open, then proceed to read through available options)</li>
</ul>
-<p>As you can see, the bad points listed above aren't <em>that</em> bad. I see them more as minor potholes along the UX journey for your end-users. A good portion of hamburger menu examples in the wild work perfectly fine and should remain as they are. However, those outliers who abuse or misuse the hamburger concept should be introduced to <strong>sausage links</strong>.</p>
-<h2>Sausage Links</h2>
-<p>I should start by mentioning that this concept is far from <strong>new</strong>. There are a good number of websites that already implement this menu type in some form or another. The point of this post isn't to blow your mind with some new-never-thought-of navigation design. I'm just trying to bring awareness to another available menu concept.</p>
-<p>Enough chit-chat, let's take a look at sausage links in action:</p>
+
+<p>As you can see, the bad points listed above aren&#8217;t <em>that</em> bad. I see them more as minor potholes along the UX journey for your end-users. A good portion of hamburger menu examples in the wild work perfectly fine and should remain as they are. However, those outliers who abuse or misuse the hamburger concept should be introduced to <strong>sausage links</strong>.</p>
+
+<h2 id="sausage-links">Sausage Links</h2>
+
+<p>I should start by mentioning that this concept is far from <strong>new</strong>. There are a good number of websites that already implement this menu type in some form or another. The point of this post isn&#8217;t to blow your mind with some new-never-thought-of navigation design. I&#8217;m just trying to bring awareness to another available menu concept.</p>
+
+<p>Enough chit-chat, let&#8217;s take a look at sausage links in action:</p>
+
<p><img src="/public/images/scrolling-navigation.png" alt="Scrolling menu with sausage links" /></p>
+
<p><a href="https://codepen.io/bradleytaunt/pen/QXjjbE/">Live CodePen Example</a></p>
-<p>The above CodePen adds a good amount of visual design fluff, so let's take a look at the bare minimum HTML &amp; CSS needed to accomplish this menu:</p>
-<pre><code>&lt;nav class=&quot;sausage-links&quot;&gt;
- &lt;ul&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Homepage&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Categories&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Filter Properties&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Edit Optional Tags&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Research Papers&lt;/a&gt;&lt;/li&gt;
- &lt;li&gt;&lt;a href=&quot;&quot;&gt;Contact Our Team&lt;/a&gt;&lt;/li&gt;
- &lt;/ul&gt;
-&lt;/nav&gt;
-</code></pre>
-<pre><code>/* Sausage Links Nav Container */
+
+<p>The above CodePen adds a good amount of visual design fluff, so let&#8217;s take a look at the bare minimum HTML &#38; CSS needed to accomplish this menu:</p>
+
+<pre><code>&#60;nav class="sausage-links"&#62;
+ &#60;ul&#62;
+ &#60;li&#62;&#60;a href=""&#62;Homepage&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;li&#62;&#60;a href=""&#62;Categories&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;li&#62;&#60;a href=""&#62;Filter Properties&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;li&#62;&#60;a href=""&#62;Edit Optional Tags&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;li&#62;&#60;a href=""&#62;Research Papers&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;li&#62;&#60;a href=""&#62;Contact Our Team&#60;&#47;a&#62;&#60;&#47;li&#62;
+ &#60;&#47;ul&#62;
+&#60;&#47;nav&#62;
+
+
+
+&#47;* Sausage Links Nav Container *&#47;
.sausage-links {
position: relative;
}
-/* The left and right &quot;faded&quot; pseudo elements */
+&#47;* The left and right "faded" pseudo elements *&#47;
.sausage-links:before, .sausage-links:after {
- content: '';
+ content: &#39;&#39;;
height: calc(100% - 2em);
pointer-events: none;
position: absolute;
@@ -75,7 +95,7 @@
left: 0;
}
-/* Basic flexbox to prevent items from breaking lines */
+&#47;* Basic flexbox to prevent items from breaking lines *&#47;
.sausage-links ul {
display: flex;
flex-wrap: nowrap;
@@ -91,26 +111,36 @@
display: inline-block;
}
</code></pre>
+
<p>Pretty simple, eh?</p>
+
<p><strong>Update</strong>: Thanks to <a href="https://twitter.com/dany0w">@dany0w</a> for pointing out that I forgot to include <code>-webkit-overflow-scrolling: touch</code> for momentum scrolling on iOS.</p>
-<h3>The Good</h3>
+
+<h3 id="the-good-1">The Good</h3>
+
<ul>
<li>Extremely minimal amount of CSS required</li>
-<li>Screen reader / keyboard-only safe</li>
+<li>Screen reader &#47; keyboard-only safe</li>
<li>Zero JavaScript needed</li>
<li>No need for hacky hidden <code>radio</code> inputs for toggling parent containers etc.</li>
<li>Users can see first few available options without any interaction</li>
</ul>
-<h3>The Bad</h3>
+
+<h3 id="the-bad-1">The Bad</h3>
+
<ul>
<li>May not look the most visually appealing for certain project designs (ugly scrollbar in some instances)</li>
<li>Better suited for small to medium menu lists compared to massive sitemaps</li>
-<li>Without proper fade / cut off visual cues, users may not understand they can scroll</li>
+<li>Without proper fade &#47; cut off visual cues, users may not understand they can scroll</li>
</ul>
-<h2>So, should I use hamburger menus or sausage links?</h2>
-<p>That really depends on your project or overall mobile design (I know, such a helpful answer). I'm sure there are even a few use cases where it would make sense to have sausage links within a toggle-based hamburger menu. The menu possibilities could be endless!</p>
-<p>That's it. I hope I've inspired you to try out sausage links in the near future or at least made you think more deeply about mobile navigation design!</p>
-<p><small>...is anyone else really hungry now?</small></p>
+
+<h2 id="so-should-i-use-hamburger-menus-or-sausage-links">So, should I use hamburger menus or sausage links?</h2>
+
+<p>That really depends on your project or overall mobile design (I know, such a helpful answer). I&#8217;m sure there are even a few use cases where it would make sense to have sausage links within a toggle-based hamburger menu. The menu possibilities could be endless!</p>
+
+<p>That&#8217;s it. I hope I&#8217;ve inspired you to try out sausage links in the near future or at least made you think more deeply about mobile navigation design!</p>
+
+<p>&#8230;is anyone else really hungry now?</p>
<footer role="contentinfo">
<h2>Menu Navigation</h2>
<ul id="menu">