<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Utilities on Socle</title><link>https://socle.uncinq.dev/docs/css-components/utilities/</link><description>Recent content in Utilities on Socle</description><generator>Hugo</generator><language>en</language><atom:link href="https://socle.uncinq.dev/docs/css-components/utilities/index.xml" rel="self" type="application/rss+xml"/><item><title>Overview</title><link>https://socle.uncinq.dev/docs/css-components/utilities/overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://socle.uncinq.dev/docs/css-components/utilities/overview/</guid><description>&lt;p&gt;One utility, in its own layer.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Page&lt;/th&gt;
 &lt;th&gt;Class&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;a href="../scrollsnap/"&gt;Scrollsnap&lt;/a&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;.scrollsnap&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Turns a grid into a horizontal snap carousel&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="why-it-is-not-a-component"&gt;Why it is not a component&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;.scrollsnap&lt;/code&gt; changes the &lt;code&gt;grid-template-columns&lt;/code&gt; that a component such as &lt;a href="../../content/items/"&gt;&lt;code&gt;.items&lt;/code&gt;&lt;/a&gt; declares for itself in &lt;code&gt;@layer components&lt;/code&gt;. A later layer beats an earlier one regardless of specificity, so putting it in &lt;code&gt;@layer utilities&lt;/code&gt; is what lets a single class opt an existing component into carousel behaviour without rewriting the component.&lt;/p&gt;</description></item><item><title>Scrollsnap</title><link>https://socle.uncinq.dev/docs/css-components/utilities/scrollsnap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://socle.uncinq.dev/docs/css-components/utilities/scrollsnap/</guid><description>&lt;p&gt;Turns a grid into a horizontal carousel with snap points. Items keep their own width, the grid stops wrapping, and the row scrolls sideways, bleeding into the gutter so the next item peeks in.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;&lt;span style="color:#f92672"&gt;div&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;items scrollsnap-md&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;&lt;span style="color:#f92672"&gt;article&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;card&amp;#34;&lt;/span&gt;&amp;gt;...&amp;lt;/&lt;span style="color:#f92672"&gt;article&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;&lt;span style="color:#f92672"&gt;article&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;card&amp;#34;&lt;/span&gt;&amp;gt;...&amp;lt;/&lt;span style="color:#f92672"&gt;article&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;&lt;span style="color:#f92672"&gt;article&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;card&amp;#34;&lt;/span&gt;&amp;gt;...&amp;lt;/&lt;span style="color:#f92672"&gt;article&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;/&lt;span style="color:#f92672"&gt;div&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It is opt-in, applied to the element that owns the grid, so the same component is a carousel in one context and a plain grid in another.&lt;/p&gt;</description></item></channel></rss>