<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="207115" data-post-id="207115">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice, thanks for sharing. I had thought about using nimble_parsec but I would need to learn it properly so just started doing by hand with what I know. Your parsec version does look more organised and less code <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>Should I change the title? The project itself is cssex but for putting it here on the forum I chose to write it as ExCSS and just saw that you named yours that.</p>
<p>CSSEx is almost fully featured, I’m writing now the custom functions part and some helpers for using them. It’s missing comments which is basic.</p>
<p>At this point specific validations can be added to every part if it was needed or wanted (I might work on adding further validations incrementally, like asserting that if you’re in a [prop=“val”], you’re using valid =, =~, ^=, equality variant, etc). Outside of proper css spec, adding further things like tree-shaking would be almost “trivial” to if there was already something to extract a hierarchy of css from an html page.</p>
<p>I did read parts of the specification for css2 but the difference when parsing CSS  from something as cssex or sass , is that the rules are stricter on CSS and in this you depend on further things inside the blocks to output and validate - once you introduce the concatenation &amp; and you’re inside a block everything goes because almost any character can concatenate to the top level chain to produce a valid selector.<br>
So if you want to verify it you need to evaluate it after the fact (and it also depends if any more concatenation elements are inside this selector as well as they would tag into its trail, because it can be arbitrarily nested).</p>
<p>Then outputting that into css, the same with simple nesting like having media queries inside selectors, you can’t generate the css rule in place, as you have to put the previous selector chain inside the media block and the contents of the media block inside this selector.  Then if you do <span class="mention">@includes</span>, that brings another file in place that can also be inside arbitrary blocks… Then it needs variables and interpolation and these have to be tossed around too, plus keeping the lines &amp; columns information and parsing step.</p>
<p>At that point you need to carry a bag of things as you parse and store them in other format than plain binary, but it would be interesting to see a fuller implementation just with parsec to see how it ends up looking.</p>
<p>I looked at the tests but I didn’t understand how those are supposed to be run. I’m just writing small chunks of relevant cssex and assert on the output, and some errors/warnings. Once I have the functions finished I’ll translate a fairly complex sass stylesheet (a small css framework I usually use) into cssex to do a final bigger test of correctness and others of speed (as it is I’m seeing significant different between dart-sass 0.15s to  cssex 0.01s but these weren’t scientific). Maybe I could use those tests to assert on the generated CSS.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207115" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-207115" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207115"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="207123" data-post-id="207123">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="olafura" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/olafura/120/12420_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  olafura
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The reason why I did a full parser is mostly because if you introduce some of the nesting rules it’s hard to know how to apply them without knowing what structure you have.<br>
<a href="https://github.com/postcss/postcss-nested" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/postcss/postcss-nested</a></p>
<p>I also wanted to try building a proper css parser by the spec and because <a href="https://github.com/acammack-r7/erlang-css" class="inline-onebox" rel="noopener nofollow ugc">GitHub - acammack-r7/erlang-css: A library for parsing and serializing CSS · GitHub</a> failed on some css code I tested it with.</p>
<p>I don’t think anyone is using my library so I don’t mind any name conflict since I haven’t really mentioned it anywhere I believe and it’s kind of a niche until it is really solid and has a lot of examples.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207123" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-207123" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207123"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="207125" data-post-id="207125">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="olafura" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/olafura/120/12420_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  olafura
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice I didn’t know there was a spec for nesting will have to look at that:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://drafts.csswg.org/css-nesting-1/">
  <header class="source">

      <a href="https://drafts.csswg.org/css-nesting-1/" target="_blank" rel="noopener nofollow ugc">drafts.csswg.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://drafts.csswg.org/css-nesting-1/" target="_blank" rel="noopener nofollow ugc">CSS Nesting Module Level 1</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p><a href="https://github.com/csstools/postcss-nesting" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/csstools/postcss-nesting</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207125" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-207125" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207125"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="207134" data-post-id="207134">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Neither did I. And I just noticed a pretty significant oversight on mine that thankfully is easily correctable.</p>
<p>Anyway, why introduce a character &amp; to indicate that it’s a plain nest? I mean what else could it be if it’s not a rule (<code>&lt;text&gt;&lt;colon&gt;&lt;text&gt;&lt;semicolon&gt;</code>)?</p>
<p>And I think would be great if they went for nested <span class="mention">@media</span> expressions (but not media inside media as that doesn’t make sense, well, it could make sense but would get overall more confusing and easy to create impossible to meet rules)</p>
<blockquote>
<p><strong>NOTICE</strong> : In a future version of this project, nesting at-rules like <code>@media</code> may be deprecated, as they are not part of the nesting proposal. In a comment, a CSSWG member expressed interest in handling nested <code>@media</code> while handling selector nesting. So deprecating nested at-rules has been temporarily delayed.</p>
</blockquote>
<p>But media inside plain selector blocks in some cases it allows you to see the whole element styling in one single place.</p>
<p>I’ll give a look at the draft because if they implement their &amp; then I need to find another valid char for the concatenation x)</p>
<aside class="quote no-group" data-username="olafura" data-post="13" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/olafura/48/12420_2.png" class="avatar"> olafura:</div>
<blockquote>
<p>The reason why I did a full parser is mostly because if you introduce some of the nesting rules it’s hard to know how to apply them without knowing what structure you have.</p>
</blockquote>
</aside>
<p>It’s pretty useful specially if it’s done to the spec I think.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207134" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-207134" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207134"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="207196" data-post-id="207196">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>So I did a bit more reading on the draft.</p>
<p>It’s interesting and I think it covers what nesting needs to be but I’m not sure about using only &amp;. I’m going to use sass/scss as the comparison (but I haven’t went to confirm their spec is exactly as this though so I might be slightly off here):</p>
<p>I always use and thought of <code>&amp;</code> as being specifically concatenation.<br>
This means that</p>
<pre data-code-wrap="scss"><code class="lang-scss">button {
      &amp;.btn-red { background-color: red; }
      &amp;.btn-blue { background-color: blue; }

      span { margin-left: 10px; }
}
</code></pre>
<p>Produces:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">button.btn-red { ... }
button.btn-blue { ... }
button span { ... }
</code></pre>
<p>So &amp; “glues” the selector described afterwards to the parent(s) selector chain(s) up to its opening. This would be used just to describe things where selectors change the styling of the parent.</p>
<p>A non &amp; selector does simple CSS selection when nested. This selector when “inside” the parent(s) selector chain(s). And is used just to facilitate the styling of child elements of the selector up to it.</p>
<p>I think this is less ambiguous. They also suggest adding an additional <code>@nested</code> at-rule to combat the readability issues,</p>
<blockquote>
<p>While <a href="https://drafts.csswg.org/css-nesting-1/#direct-nesting" rel="noopener nofollow ugc">direct nesting</a> looks nice, it is somewhat fragile. Some valid nesting selectors, like <code>.foo &amp;</code>, are disallowed, and editing the selector in certain ways can make the rule invalid unexpectedly. As well, some people find the nesting challenging to distinguish visually from the surrounding declarations.</p>
</blockquote>
<p>because in their proposal you can use <code>&amp;.concatenate</code> and <code>&amp; .not-concatenated.</code> and they’ll have different css meanings while being hard to spot the space between the <code>&amp;</code> and the selector chain. (and my parser right now does the same thing although it’s technically wrong for how I see it used, it’s an easy fix nonetheless and I think I will implement it in this stricter sense too)</p>
<p>The other point about invalid nesting, single trailing <code>&amp;</code> could be taken care of by being stricter where a nesting can be placed - e.g. only at the beginning of a non top level selector, and no spaces between it and the selector - translated to warning about invalid rules automatically when that occurs - which means it’s always a glue me up operation. This would also make IDE’s, parsers and additional tooling life’s easier.</p>
<p>I see they have a GitHub repo to provide feedback and discussion I might take this there to see their thoughts on it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207196" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-207196" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207196"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="207324" data-post-id="207324">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="amnu3387" data-post="16" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/48.png" class="avatar"> amnu3387:</div>
<blockquote>
<p>I see they have a GitHub repo to provide feedback and discussion I might take this there to see their thoughts on it.</p>
</blockquote>
</aside>
<p>Yeap, closed with “wont-fix”. Which is funny given it’s a draft for a spec extension.<br>
I sometimes don’t understand how this works. It’s not like there’s no prior art. Sass is from 2006, less is from 2009, they’re the most widely used pre-processors and introduced this idea.</p>
<p>Along comes the opportunity a new spec and instead of using the ideas that prompted the spec, they change them to the point they’re incompatible with what people already showed they preferred, while still introducing complexity (or more) and worse readability.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207324" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-207324" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207324"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="207327" data-post-id="207327">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tj0" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tj0
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Totally looking forward to your library so that I can get rid of some more webpack and npm craziness. Just yesterday I tried to install some project that depended on yarn and even after an npm install it gave an amusingly opaque error which I failed to resolved.</p>
<p>I got confused reading through the <a href="https://github.com/w3c/csswg-drafts/issues/6119" rel="noopener nofollow ugc">issue</a>  likely since I’m still a novice at css. The example on the SASS site for <a href="https://sass-lang.com/documentation/style-rules/parent-selector" rel="noopener nofollow ugc">parent selector</a>, they actually used a space on the dir=rtl line. Maybe it’s meant more as search and replace rather than concatenation?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207327" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-207327" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207327"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="207334" data-post-id="207334">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks! It’s almost feature complete. Another of the reasons I decided to write it was also because I was trying to setup an old nuxt project that used node-sass and couldn’t get libsass to work on ubuntu (maybe for a good reason, but was still pretty annoying trying first to fix that - ultimately went with the new js based sass). If there’s any utilities you would like to see available tell me and I can look into adding them.</p>
<aside class="quote no-group" data-username="tj0" data-post="18" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/48db29/48.png" class="avatar"> tj0:</div>
<blockquote>
<p>I got confused reading through the <a href="https://github.com/w3c/csswg-drafts/issues/6119" rel="noopener nofollow ugc">issue</a> likely since I’m still a novice at css. The example on the SASS site for <a href="https://sass-lang.com/documentation/style-rules/parent-selector" rel="noopener nofollow ugc">parent selector</a>, they actually used a space on the dir=rtl line. Maybe it’s meant more as search and replace rather than concatenation?</p>
</blockquote>
</aside>
<p>I think the real reason why they don’t consider the option (besides having everything lined up and docs written, etc) is because it changes how the parsing has to be done inside a block. Right now in css2 if you’re inside a block and you reach a colon <code>:</code> per the spec you can be sure that you’re in an attribute.</p>
<p>If you are now to add the ability to nest selectors and want to keep that unambiguity, due to the fact that pseudo-selectors &amp; pseudo-classes both use colons, e.g. <code>:hover</code>, you need to somehow signal the line you’re starting inside the block, because otherwise when reaching that colon it would be ambiguous if it was an attribute or a selector. So you “can’t” have a naked nested selector without doing some changes on a parser that was relying on the colon.</p>
<p>So they introduced a similar approach to scss with the ampersand token. But in scss you have <code>&amp;</code> and can have a naked selector too, and it does nesting as well, but has a different meaning from the <code>&amp;</code>.</p>
<pre data-code-wrap="scss"><code class="lang-scss">div {
      &amp;:hover { color: red; }
      button:hover { color: green; }
}
// this results in
div:hover { color: red; }
div button:hover { color: green; }
</code></pre>
<p>So the “parent” selector basically appends the selector to the previous chain, while a naked declaration just adds another selector to the chain.</p>
<p>In css3 it will be:</p>
<pre data-code-wrap="scss"><code class="lang-scss">div {
      &amp;:hover { color: red; }
      &amp; button:hover { color: green; }
}
</code></pre>
<p>And the difference is that space between <code>&amp;</code> and the selector - and this is were I dislike the proposal because it makes it harder to distinguish between two different outcomes in the css rule. It also means that in a sequence of nested comma-separated selectors, all of them have to be prefixed by <code>&amp;</code>, while otherwise you could write <code>&amp;.concatened, .non-concatenated { ... }</code>. And then there’s another <code>@</code> rule being introduced (<code>@nest</code>) that is less strict than the <code>&amp;</code>.</p>
<p>Anyway, first world problems for sure but I think overall the scss syntax is way cleaner, and given that the parsers are fairly outnumbered by the people writing css (maybe 50, between browser engines and css pre-post processors?), that a new spec that required a change on the parsers side to instead decide at the end of the declaration if it’s an attribute or a selector wouldn’t be the end of world.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207334" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-207334" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207334"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="207348" data-post-id="207348">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tj0" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tj0
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think I get it now. Looks like the following line of the spec:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">To be nest-prefixed, a nesting selector must be the first simple selector in the first compound selector of the selector. If the selector is a list of selectors, every complex selector in the list must be nest-prefixed for the selector as a whole to nest-prefixed.
</code></pre>
<p>From their <a href="https://drafts.csswg.org/css-nesting-1/#direct" rel="noopener nofollow ugc">example 4</a>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">.foo {
  color: red;
  .bar { color: blue; }
}
/* Invalid because there’s no nesting selector */
</code></pre>
<p>The SASS syntax <a href="https://sass-lang.com/guide" rel="noopener nofollow ugc">for nesting</a> is pretty useful for nesting, you hardly have to think about it.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">nav {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
}
</code></pre>
<p>I’m pretty confused myself why someone would try to modify syntax that seems to be working from 15 years ago, but there must be some esoteric reason.</p>
<p>Thanks for the explanation.</p>
<aside class="quote no-group" data-username="amnu3387" data-post="19" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/ed8c4c/48.png" class="avatar"> amnu3387:</div>
<blockquote>
<p>Another of the reasons I decided to write it was also because I was trying to setup an old nuxt project</p>
</blockquote>
</aside>
<p>Yah, I’m considering removing the bundler and just concatenating minified files also. One of my pet peeves is coming back to side projects, cloning them, and finding out they no longer can be built. From my limited experience, it appears that anything involving the NPM ecosystem has maybe a longevity of a year before maintenance is needed for code rot.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207348" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-207348" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207348"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="207367" data-post-id="207367">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="amnu3387" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  amnu3387
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="tj0" data-post="20" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/48db29/48.png" class="avatar"> tj0:</div>
<blockquote>
<p>I’m pretty confused myself why someone would try to modify syntax that seems to be working from 15 years ago, but there must be some esoteric reason.</p>
</blockquote>
</aside>
<p>Yep, I’m also not in the loop so don’t know what has to be taken into consideration and limitations or who are the stakeholders. Still annoyed though.</p>
<aside class="quote no-group" data-username="tj0" data-post="20" data-topic="38230">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/48db29/48.png" class="avatar"> tj0:</div>
<blockquote>
<p>One of my pet peeves is coming back to side projects, cloning them, and finding out they no longer can be built.</p>
</blockquote>
</aside>
<p>Yeah, some times it’s a bit finicky - but to be honest with so much complexity in tooling, sprawl in packages, etc, I’m amazed it usually just kinda works - though personally I don’t think this is a sane default for “web-dev” work.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="207367" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ex-css-sass-simile-in-pure-elixir/38230/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-207367" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="207367"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/38230/load_more?page=3">Load more posts (10 remaining)</a>
</div></template></turbo-stream>