<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>markdown &amp;mdash; notebook</title>
    <link>https://notesfromjason.writeas.com/tag:markdown</link>
    <description>[« From Jason](https://fromjason.xyz) &lt;span&gt;|&lt;/span&gt;  Free typos included. </description>
    <pubDate>Wed, 22 Apr 2026 10:07:08 +0000</pubDate>
    <item>
      <title>Experimenting with markdown &amp; CSS in write.as</title>
      <link>https://notesfromjason.writeas.com/testing-markdown-and-css-in-write-as?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Objective: I&#39;d like to style the extended metadata I use in each article which include Type, Regarding, Created, Last Edited. &#xA;&#xA;!--comments--&#xA;!--more--&#xA;&#xA;Ideally, I could style a div to look like a bootstrap-style &#34;card&#34; with padding and a border. &#xA;&#xA;Challenge: The issue is that hashtags in write.as don&#39;t activate within HTML tags added in the editor. But if the html is added using markdown the hashtags work.&#xA;&#xA;So, I&#39;ll need a markdown solution that:&#xA;&#xA;Wraps an html tag around the metadata so I can reference in CSS.&#xA;Isn&#39;t an element I&#39;ll use for anything else since I cannot use CSS IDs or Classes with the write.as implementation of markdown.&#xA;&#xA;---&#xA;&#xA;Option 1: Unordered List&#xA;I can use unordered lists as markdown wraps them in ul. A screenshot of what it looks like with a bit of CSS:&#xA;&#xA;Styled unordered list&#xA;&#xA;Con: Reserving unordered lists exclusively for this purpose doesn&#39;t seem reasonable. &#xA;&#xA;Pro: I at least have ordered lists ol as a second option for everything else.&#xA;&#xA;Pro: It appears I have more styling control over lists than tables. &#xA;&#xA;---&#xA;&#xA;Option 2: Table&#xA; I can use tables as markdown wraps it with table tags. Here&#39;s a screenshot:&#xA;&#xA;Styled table&#xA;&#xA;Con: But, again, I&#39;d have to reserve tables exclusively for this use. At least with lists, I have a second option. If I take tables off the uh, table, that&#39;s it. I can&#39;t use it anymore.&#xA;&#xA;Con: I have less CSS control, apparently. Tables are set to display: table-row-group which won&#39;t allow me to add padding or border radius to the table tag. I guess I could try changing the display value but it could mess up something else.&#xA;&#xA;Pro: Tables default to columns. Single-column lists create a lot of wasted space. I would have to play with the float properties which, blah.&#xA;&#xA;---&#xA;&#xA;Experiments&#xA;&#xA;For Option 1, there&#39;s a lot of wasted space as the list can only populate in a single column by default. I&#39;m wondering if I can created a nested list and then float the parent li to make two columns. &#xA;&#xA;Take 1: Looks like I get close to what I need with the display: table properties:&#xA;&#xA;Styled nested list with display table&#xA;&#xA;Take 2: Taking shape on desktop:&#xA;&#xA;Styled nested list with display table&#xA;&#xA;Take 3: Mobile formatting:&#xA;&#xA;Mobile Version&#xA;&#xA;---&#xA;&#xA;Current View&#xA;&#xA;Categories&#xA;    Type: #Experiment&#xA;    Re: #Markdown #DigitalGarden&#xA;Dates&#xA;    Created: 9/30/2023&#xA;    Last Edited: 9/30/2023&#xA;&#xA;---&#xA;&#xA;Conclusion&#xA;I opted for the unordered list solution for now. We&#39;ll see how well it holds up and scales. I&#39;ll update with more if I change stuff up.&#xA;&#xA;Bug: The hr loses its margins in the #collection view on the homepage for some reason. Can&#39;t figure out why.&#xA;&#xA;Bug with homepage&#xA;&#xA;---&#xA;&#xA;Code&#xA;&#xA;The markdown and css is below. I also put on my Notion for easier copy / paste.&#xA;&#xA;https://fromjason.notion.site/Code-Experimenting-with-markdown-CSS-in-write-as-8c50bc0e767445c78f99c1e460330424?pvs=4&#xA;&#xA;Markdown for nested list&#xA;&#xA;Categories&#xA;    Type: #Experiment&#xA;    Re: #Markdown #DigitalGarden&#xA;Dates&#xA;    Created: 9/30/2023&#xA;    Last Edited: 9/30/2023&#xA;&#xA; &#xA;/ Css for styling nested list in article/&#xA; #post article ul{&#xA;     border: 1px solid #ccc;&#xA;     padding: 30px;&#xA;     list-style-type: none;&#xA;     border-radius: 5px;&#xA;     font-size: 0.85em;&#xA;     color: #555;&#xA;     display: table !important;&#xA;     width: 90%;&#xA;}&#xA; #post article ul li{&#xA;     display: table-cell;&#xA;}&#xA; #post article ul li ul{&#xA;     display: table-row !important;&#xA;     border: 0;&#xA;}&#xA; #post article ul li ul:before{&#xA;     display: block;&#xA;     content: &#39;&#39;;&#xA;     margin-bottom: 10px;&#xA;     border-bottom: 1px solid #ccc;&#xA;}&#xA; #post article ul li ul li{&#xA;     display: table-row;&#xA;}&#xA; #post article ul li a{&#xA;    / color: #222;&#xA;     Change color of hashtag link inside list/&#xA;}&#xA;/ reverts back to inline-block for mobile /&#xA; @media only screen and (max-width: 576px) {&#xA;     #post article ul{&#xA;         padding: 0px;&#xA;         border-radius: 4px;&#xA;         display: block !important;&#xA;         width: 100%;&#xA;         border: 0;&#xA;    }&#xA;     #post article ul li{&#xA;         display: inline-block !important;&#xA;    }&#xA;     #post article ul li:nth-child(2){&#xA;         margin-top: 15px;&#xA;    }&#xA;     #post article ul li ul{&#xA;         display: block !important;&#xA;         border: 0;&#xA;         margin-top: 5px;&#xA;    }&#xA;     #post article ul li ul:before{&#xA;         display: block;&#xA;         content: &#39;&#39;;&#xA;         margin-bottom: 5px;&#xA;         border-bottom: 1px solid #ccc;&#xA;    }&#xA;     #post article ul li ul li{&#xA;         display: inline-block;&#xA;    }&#xA;     #post article ul li ul li:nth-child(2){&#xA;         margin-top: 5px;&#xA;    }&#xA;}&#xA;&#xA;p.description a{&#xA;     color: #555;&#xA;}&#xA; p.description a:visited{&#xA;     color: #555;&#xA;}&#xA; p.description span{&#xA;     color: #888;&#xA;}&#xA;/ list css for extended meta data in article/&#xA; #post article ul{&#xA;     border: 1px solid #ccc;&#xA;     padding: 30px;&#xA;     list-style-type: none;&#xA;     border-radius: 5px;&#xA;     font-size: 0.85em;&#xA;     color: #555;&#xA;     display: table !important;&#xA;     width: 90%;&#xA;}&#xA; #post article ul li{&#xA;     display: table-cell;&#xA;}&#xA; #post article ul li ul{&#xA;     display: table-row !important;&#xA;     border: 0;&#xA;}&#xA; #post article ul li ul:before{&#xA;     display: block;&#xA;     content: &#39;&#39;;&#xA;     margin-bottom: 10px;&#xA;     border-bottom: 1px solid #ccc;&#xA;}&#xA; #post article ul li ul li{&#xA;     display: table-row;&#xA;}&#xA; #post article ul li a{&#xA;    / color: #222;&#xA;     Change color of hashtag link inside list/&#xA;}&#xA; @media only screen and (max-width: 576px) {&#xA;     #post article ul{&#xA;         padding: 0px;&#xA;         border-radius: 4px;&#xA;         display: block !important;&#xA;         width: 100%;&#xA;         border: 0;&#xA;    }&#xA;     #post article ul li{&#xA;         display: inline-block !important;&#xA;    }&#xA;     #post article ul li:nth-child(2){&#xA;         margin-top: 15px;&#xA;    }&#xA;     #post article ul li ul{&#xA;         display: block !important;&#xA;         border: 0;&#xA;         margin-top: 5px;&#xA;    }&#xA;     #post article ul li ul:before{&#xA;         display: block;&#xA;         content: &#39;&#39;;&#xA;         margin-bottom: 5px;&#xA;         border-bottom: 1px solid #ccc;&#xA;    }&#xA;     #post article ul li ul li{&#xA;         display: inline-block;&#xA;    }&#xA;     #post article ul li ul li:nth-child(2){&#xA;         margin-top: 5px;&#xA;    }&#xA;}&#xA;&#xA;/ Collection View: list css for extended meta data in article/&#xA;&#xA; #collection article ul{&#xA;     border: 1px solid #ccc;&#xA;     padding: 30px;&#xA;     list-style-type: none;&#xA;     border-radius: 5px;&#xA;     font-size: 0.85em;&#xA;     color: #555;&#xA;     display: table !important;&#xA;     width: 90%;&#xA;     margin-top: 20px;&#xA;     margin-bottom: 20px;&#xA;}&#xA; #collection article ul li{&#xA;     display: table-cell;&#xA;}&#xA; #collection article ul li ul{&#xA;     display: table-row !important;&#xA;     border: 0;&#xA;}&#xA; #collection article ul li ul:before{&#xA;     display: block;&#xA;     content: &#39;&#39;;&#xA;     margin-bottom: 10px;&#xA;     border-bottom: 1px solid #ccc;&#xA;}&#xA; #collection article ul li ul li{&#xA;     display: table-row;&#xA;}&#xA; #collection article ul li a{&#xA;    / color: #222;&#xA;     Change color of hashtag link inside list/&#xA;}&#xA;/ reverts back to inline-block for mobile /&#xA; @media only screen and (max-width: 576px) {&#xA;     #collection article ul{&#xA;         padding: 0px;&#xA;         border-radius: 4px;&#xA;         display: block !important;&#xA;         width: 100%;&#xA;         border: 0;&#xA;    }&#xA;     #collection article ul li{&#xA;         display: inline-block !important;&#xA;    }&#xA;     #collection article ul li:nth-child(2){&#xA;         margin-top: 15px;&#xA;    }&#xA;     #collection article ul li ul{&#xA;         display: block !important;&#xA;         border: 0;&#xA;         margin-top: 5px;&#xA;    }&#xA;     #collection article ul li ul:before{&#xA;         display: block;&#xA;         content: &#39;&#39;;&#xA;         margin-bottom: 5px;&#xA;         border-bottom: 1px solid #ccc;&#xA;    }&#xA;     #collection article ul li ul li{&#xA;         display: inline-block;&#xA;    }&#xA;     #collection article ul li ul li:nth-child(2){&#xA;         margin-top: 5px;&#xA;    }&#xA;}&#xA; &#xA;&#xA;---&#xA;&#xA;Sources&#xA;&#xA;http://www.senktec.com/2014/01/using-css-display-table-cell-for-columns/&#xA;&#xA;https://www.sitepoint.com/community/t/display-table-row-and-padding/6032/2&#xA;&#xA;---&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><strong>Objective:</strong> I&#39;d like to style the extended metadata I use in each article which include <em>Type, Regarding, Created, Last Edited</em>.</p>





<p>Ideally, I could style a <code>&lt;div&gt;</code> to look like a bootstrap-style “<a href="https://getbootstrap.com/docs/4.0/components/card/" rel="nofollow">card</a>” with padding and a border.</p>

<p><strong>Challenge:</strong> The issue is that hashtags in write.as don&#39;t activate within HTML tags added in the editor. But if the html is added using <em>markdown</em> the hashtags work.</p>

<p>So, I&#39;ll need a markdown solution that:</p>
<ol><li>Wraps an html tag around the metadata so I can reference in CSS.</li>
<li>Isn&#39;t an element I&#39;ll use for anything else since I cannot use CSS IDs or Classes with the write.as implementation of markdown.</li></ol>

<hr/>

<h2 id="option-1-unordered-list" id="option-1-unordered-list">Option 1: Unordered List</h2>

<p>I can use unordered lists as markdown wraps them in <code>&lt;ul&gt;</code>. A screenshot of what it looks like with a bit of CSS:</p>

<p><img src="https://i.snap.as/ChaiV3KW.jpg" alt="Styled unordered list"/></p>

<p><strong>Con:</strong> Reserving unordered lists exclusively for this purpose doesn&#39;t seem reasonable.</p>

<p><strong>Pro:</strong> I at least have ordered lists <code>&lt;ol&gt;</code> as a second option for everything else.</p>

<p><strong>Pro:</strong> It appears I have more styling control over lists than tables.</p>

<hr/>

<h2 id="option-2-table" id="option-2-table">Option 2: Table</h2>

<p> I can use tables as markdown wraps it with <code>&lt;table&gt;</code> tags. Here&#39;s a screenshot:</p>

<p><img src="https://i.snap.as/EjnQW4oV.jpg" alt="Styled table"/></p>

<p><strong>Con:</strong> But, again, I&#39;d have to reserve tables exclusively for this use. At least with lists, I have a second option. If I take tables off the uh, table, that&#39;s it. I can&#39;t use it anymore.</p>

<p><strong>Con:</strong> I have less CSS control, apparently. Tables are set to <code>display: table-row-group</code> which won&#39;t allow me to add padding or border radius to the <code>&lt;table&gt;</code> tag. I guess I could try changing the <code>display</code> value but it could mess up something else.</p>

<p><strong>Pro:</strong> Tables default to columns. Single-column lists create a lot of wasted space. I would have to play with the <code>float</code> properties which, blah.</p>

<hr/>

<h2 id="experiments" id="experiments">Experiments</h2>

<p><strong>For Option 1</strong>, there&#39;s a lot of wasted space as the list can only populate in a single column by default. I&#39;m wondering if I can created a nested list and then float the parent <code>&lt;li&gt;</code> to make two columns.</p>

<p><em>Take 1</em>: Looks like I get close to what I need with the <code>display: table</code> properties:</p>

<p><img src="https://i.snap.as/8KLQHeYt.jpg" alt="Styled nested list with display table"/></p>

<p><em>Take 2</em>: Taking shape on desktop:</p>

<p><img src="https://i.snap.as/q4c8mqlA.jpg" alt="Styled nested list with display table"/></p>

<p><em>Take 3</em>: Mobile formatting:</p>

<p><img src="https://i.snap.as/77Y8zv43.jpg" alt="Mobile Version"/></p>

<hr/>

<h2 id="current-view" id="current-view">Current View</h2>
<ul><li>Categories
<ul><li>Type: <a href="https://notesfromjason.writeas.com/tag:Experiment" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Experiment</span></a></li>
<li>Re: <a href="https://notesfromjason.writeas.com/tag:Markdown" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Markdown</span></a> <a href="https://notesfromjason.writeas.com/tag:DigitalGarden" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">DigitalGarden</span></a></li></ul></li>
<li>Dates
<ul><li>Created: 9/30/2023</li>
<li>Last Edited: 9/30/2023</li></ul></li></ul>

<hr/>

<h2 id="conclusion" id="conclusion">Conclusion</h2>

<p>I opted for the unordered list solution for now. We&#39;ll see how well it holds up and scales. I&#39;ll update with more if I change stuff up.</p>

<p><em>Bug</em>: The <code>&lt;hr&gt;</code> loses its margins in the <code>#collection</code> view on the homepage for some reason. Can&#39;t figure out why.</p>

<p><img src="https://i.snap.as/W5m2F2Dz.jpg" alt="Bug with homepage"/></p>

<hr/>

<h2 id="code" id="code">Code</h2>

<p>The markdown and css is below. I also put on my Notion for easier copy / paste.</p>

<p><a href="https://fromjason.notion.site/Code-Experimenting-with-markdown-CSS-in-write-as-8c50bc0e767445c78f99c1e460330424?pvs=4" rel="nofollow">https://fromjason.notion.site/Code-Experimenting-with-markdown-CSS-in-write-as-8c50bc0e767445c78f99c1e460330424?pvs=4</a></p>

<pre><code># Markdown for nested list

* Categories
    * Type: #Experiment
    * Re: #Markdown #DigitalGarden
* Dates
    * Created: 9/30/2023
    * Last Edited: 9/30/2023

</code></pre>

<pre><code> 
/* Css for styling nested list in article*/
 #post article ul{
     border: 1px solid #ccc;
     padding: 30px;
     list-style-type: none;
     border-radius: 5px;
     font-size: 0.85em;
     color: #555;
     display: table !important;
     width: 90%;
}
 #post article ul li{
     display: table-cell;
}
 #post article ul li ul{
     display: table-row !important;
     border: 0;
}
 #post article ul li ul:before{
     display: block;
     content: &#39;&#39;;
     margin-bottom: 10px;
     border-bottom: 1px solid #ccc;
}
 #post article ul li ul li{
     display: table-row;
}
 #post article ul li a{
    /* color: #222;
     Change color of hashtag link inside list*/
}
/* reverts back to inline-block for mobile */
 @media only screen and (max-width: 576px) {
     #post article ul{
         padding: 0px;
         border-radius: 4px;
         display: block !important;
         width: 100%;
         border: 0;
    }
     #post article ul li{
         display: inline-block !important;
    }
     #post article ul li:nth-child(2){
         margin-top: 15px;
    }
     #post article ul li ul{
         display: block !important;
         border: 0;
         margin-top: 5px;
    }
     #post article ul li ul:before{
         display: block;
         content: &#39;&#39;;
         margin-bottom: 5px;
         border-bottom: 1px solid #ccc;
    }
     #post article ul li ul li{
         display: inline-block;
    }
     #post article ul li ul li:nth-child(2){
         margin-top: 5px;
    }
}

p.description a{
     color: #555;
}
 p.description a:visited{
     color: #555;
}
 p.description span{
     color: #888;
}
/* list css for extended meta data in article*/
 #post article ul{
     border: 1px solid #ccc;
     padding: 30px;
     list-style-type: none;
     border-radius: 5px;
     font-size: 0.85em;
     color: #555;
     display: table !important;
     width: 90%;
}
 #post article ul li{
     display: table-cell;
}
 #post article ul li ul{
     display: table-row !important;
     border: 0;
}
 #post article ul li ul:before{
     display: block;
     content: &#39;&#39;;
     margin-bottom: 10px;
     border-bottom: 1px solid #ccc;
}
 #post article ul li ul li{
     display: table-row;
}
 #post article ul li a{
    /* color: #222;
     Change color of hashtag link inside list*/
}
 @media only screen and (max-width: 576px) {
     #post article ul{
         padding: 0px;
         border-radius: 4px;
         display: block !important;
         width: 100%;
         border: 0;
    }
     #post article ul li{
         display: inline-block !important;
    }
     #post article ul li:nth-child(2){
         margin-top: 15px;
    }
     #post article ul li ul{
         display: block !important;
         border: 0;
         margin-top: 5px;
    }
     #post article ul li ul:before{
         display: block;
         content: &#39;&#39;;
         margin-bottom: 5px;
         border-bottom: 1px solid #ccc;
    }
     #post article ul li ul li{
         display: inline-block;
    }
     #post article ul li ul li:nth-child(2){
         margin-top: 5px;
    }
}

/* Collection View: list css for extended meta data in article*/

 #collection article ul{
     border: 1px solid #ccc;
     padding: 30px;
     list-style-type: none;
     border-radius: 5px;
     font-size: 0.85em;
     color: #555;
     display: table !important;
     width: 90%;
     margin-top: 20px;
     margin-bottom: 20px;
}
 #collection article ul li{
     display: table-cell;
}
 #collection article ul li ul{
     display: table-row !important;
     border: 0;
}
 #collection article ul li ul:before{
     display: block;
     content: &#39;&#39;;
     margin-bottom: 10px;
     border-bottom: 1px solid #ccc;
}
 #collection article ul li ul li{
     display: table-row;
}
 #collection article ul li a{
    /* color: #222;
     Change color of hashtag link inside list*/
}
/* reverts back to inline-block for mobile */
 @media only screen and (max-width: 576px) {
     #collection article ul{
         padding: 0px;
         border-radius: 4px;
         display: block !important;
         width: 100%;
         border: 0;
    }
     #collection article ul li{
         display: inline-block !important;
    }
     #collection article ul li:nth-child(2){
         margin-top: 15px;
    }
     #collection article ul li ul{
         display: block !important;
         border: 0;
         margin-top: 5px;
    }
     #collection article ul li ul:before{
         display: block;
         content: &#39;&#39;;
         margin-bottom: 5px;
         border-bottom: 1px solid #ccc;
    }
     #collection article ul li ul li{
         display: inline-block;
    }
     #collection article ul li ul li:nth-child(2){
         margin-top: 5px;
    }
}
 

</code></pre>

<hr/>

<h3 id="sources" id="sources">Sources</h3>

<p><a href="http://www.senktec.com/2014/01/using-css-display-table-cell-for-columns/" rel="nofollow">http://www.senktec.com/2014/01/using-css-display-table-cell-for-columns/</a></p>

<p><a href="https://www.sitepoint.com/community/t/display-table-row-and-padding/6032/2" rel="nofollow">https://www.sitepoint.com/community/t/display-table-row-and-padding/6032/2</a></p>

<hr/>
]]></content:encoded>
      <guid>https://notesfromjason.writeas.com/testing-markdown-and-css-in-write-as</guid>
      <pubDate>Sat, 30 Sep 2023 15:51:49 +0000</pubDate>
    </item>
  </channel>
</rss>